Multicast communication method, and apparatus and system

ABSTRACT

Embodiments of this application provide a multicast communication method that includes: receiving, by a user plane function network element, a multicast packet, where the multicast packet includes a multicast address; matching, by the user plane function network element, the multicast packet with a packet detection rule PDR on the user plane function network element; and if the multicast packet successfully matches a first PDR, and the first PDR indicates to carry on matching another PDR, carrying on, by the user plane function network element, matching the multicast packet with another PDR. Optionally, the another PDR is a PDR whose priority is not higher than that of the first PDR.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2020/096633, filed on Jun. 17, 2020, which claims priority toChinese Patent Application No. 201910523377.8, filed on Jun. 17, 2019.The disclosures of the aforementioned applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

This application relates to the field of communications technologies,and in particular, to a multicast communication method, and an apparatusand a system.

BACKGROUND

Currently, a 3rd generation partnership project (3GPP) technicalspecification (technical standard, TS) 29.244 defines a manner offorwarding a packet on a user plane, and an architecture of forwarding apacket on a user plane is shown in FIG. 1. A working mechanism offorwarding a packet on a user plane is as follows: After receiving apacket from an ingress (for example, an N3 interface), a user planefunction (UPF) network element determines, based on a 5th generation(5G) user plane protocol identifier (for example, a tunnel endpointidentifier (TEID)) of the packet, a session to which the packet belongs.Then, the UPF network element matches a packet detection rule (PDR)(there may be one or more packet detection rules) in an N4 sessioncontext of the session with characteristic information of the packet, tofind a PDR that matches the packet. The PDR specifies a forwardingaction rule (FAR), a quality of service (QoS) enforcement rule (QER),and a usage reporting rule (URR) that correspond to the packet. Further,the UPF network element may perform an operation, such as dropping(drop), forwarding (forward), buffering (buffer), reporting (notify) toa control plane, or duplicating (duplicate), on the packet according tothe FAR. The UPF network element may perform a QoS operation on thepacket according to the QER. The UPF network element may perform usagereporting on the packet according to the URR. Finally, the packet istransmitted through an egress (for example, an N6 interface). In aprocess in which the UPF network element forwards the packet accordingto the FAR, critical actions include specifying an egress identifier andan egress action. The egress action may include, for example, addingouter header creation, transport level marking, a forwarding policy, orheader enrichment.

However, when the foregoing solution is used in multicast communication,in a current packet processing mechanism of the UPF network element, amulticast packet can match only one PDR in one session, and then a datapacket is duplicated according to the FAR. In this process, tunnelinformation or a label of a to-be-duplicated data packet needs to beexplicitly indicated in the FAR. In addition, when a terminal devicemember changes, indication information in the FAR needs to becorrespondingly updated. This method is complex and inefficient.Therefore, how to improve efficiency of forwarding a multicast packet isan urgent problem to be resolved currently.

SUMMARY

Embodiments of this application provide a multicast communicationmethod, and an apparatus and a system, to improve efficiency offorwarding a multicast packet.

To achieve the foregoing objective, the following technical solutionsare used in the embodiments of this application.

According to a first aspect, a multicast communication method isprovided. The method includes: A user plane function network elementreceives a multicast packet. The multicast packet includes a multicastaddress. The user plane function network element matches the multicastpacket with a packet detection rule PDR on the user plane functionnetwork element. If the multicast packet successfully matches a firstPDR, and the first PDR indicates to carry on matching another PDR, theuser plane function network element carries on matching the multicastpacket with another PDR. Optionally, the another PDR is a PDR whosepriority is not higher than that of the first PDR. In this embodiment ofthis application, after the multicast packet successfully matches thefirst PDR that indicates to carry on matching another PDR, the userplane function network element carries on matching the multicast packetwith another PDR whose priority is not higher than that of the first PDRon the user plane function network element. In other words, according tothe solution provided in this application, the multicast packet receivedby the user plane function network element may match a plurality ofPDRs, so that the multicast packet can be forwarded to a plurality ofterminal devices according to rules (for example, FARs) associated withthe plurality of matched PDRs. In this solution, when a terminal devicemember changes, a session management function network element does notneed to perform excessive operations. Therefore, compared with asolution in which indication information in a FAR needs to becorrespondingly updated when a terminal device member changes, thissolution can improve efficiency of forwarding a multicast packet, reducea signaling interaction procedure that is related to FAR updating andthat is between the session management function network element and theuser plane function network element, and reduce signaling overheads.

In a possible design, the method further includes: If packet duplicationinformation corresponding to the first PDR matches sender information ofthe multicast packet, the user plane function network element duplicatesthe multicast packet, and processes a duplicated multicast packetaccording to a rule associated with the first PDR. Alternatively, ifpacket duplication information corresponding to the first PDR does notmatch sender information of the multicast packet, the user planefunction network element skips a process of processing the multicastpacket according to a rule associated with the first PDR. In otherwords, in this embodiment of this application, after the user planefunction network element receives the multicast packet, the multicastpacket may match a plurality of PDRs. If packet duplication informationcorresponding to the matched PDRs matches the sender information of themulticast packet, the multicast packet can be forwarded to a pluralityof terminal devices according to rules (for example, FARs) associatedwith the plurality of PDRs. If packet duplication informationcorresponding to the matched PDRs does not match the sender informationof the multicast packet, to avoid a broadcast storm, the user planefunction network element skips a process of processing the multicastpacket according to rules associated with the PDRs.

In a possible design, that the packet duplication informationcorresponding to the first PDR matches the sender information of themulticast packet includes: The packet duplication informationcorresponding to the first PDR is different from the sender informationof the multicast packet. That the packet duplication informationcorresponding to the first PDR does not match the sender information ofthe multicast packet includes: The packet duplication informationcorresponding to the first PDR is the same as the sender information ofthe multicast packet.

In a possible design, the method further includes: If packet duplicationskip information corresponding to the first PDR does not match senderinformation of the multicast packet, the user plane function networkelement duplicates the multicast packet, and processes a duplicatedmulticast packet according to a rule associated with the first PDR.Alternatively, if packet duplication skip information corresponding tothe first PDR matches sender information of the multicast packet, theuser plane function network element skips a process of processing themulticast packet according to a rule associated with the first PDR. Inother words, in this embodiment of this application, after the userplane function network element receives the multicast packet, themulticast packet may match a plurality of PDRs. If packet duplicationskip information corresponding to the matched PDRs does not match thesender information of the multicast packet, the multicast packet can beforwarded to a plurality of terminal devices according to rules (forexample, FARs) associated with the plurality of PDRs. If packetduplication skip information corresponding to the matched PDRs matchesthe sender information of the multicast packet, to avoid a broadcaststorm, the user plane function network element skips a process ofprocessing the multicast packet.

In a possible design, that the packet duplication skip informationcorresponding to the first PDR matches the sender information of themulticast packet includes: The packet duplication skip informationcorresponding to the first PDR is the same as the sender information ofthe multicast packet. That the packet duplication skip informationcorresponding to the first PDR does not match the sender information ofthe multicast packet includes: The packet duplication skip informationcorresponding to the first PDR is different from the sender informationof the multicast packet.

In a possible design, the multicast packet includes the senderinformation of the multicast packet, and the sender information of themulticast packet includes address information of a terminal device thatsends the multicast packet.

In a possible design, the method further includes: The user planefunction network element receives the sender information of themulticast packet. The sender information of the multicast packetincludes N19 indication information or N6 indication information. Forexample, the N19 indication information may be, for example, a GTP-UTEID of an N19 tunnel connecting the current UPF network element toanother UPF network element, and the N6 indication information may be,for example, information about an N6 interface.

In a possible design, the N6 indication information or the N19indication information is included in general packet radio service GPRStunneling protocol-user plane GTP-U tunnel header information.

In a possible design, that the user plane function network elementmatches the multicast packet with the PDR on the user plane functionnetwork element includes: The user plane function network elementdetermines an N4 session that matches the multicast packet and that ison the user plane function network element, and the user plane functionnetwork element matches the multicast packet with each of PDRs in the N4session in descending order of priorities of the PDRs. In other words,in this embodiment of this application, when matching the multicastpacket with the PDR on the user plane function network element, the userplane function network element first matches the multicast packet withan N4 session to which the PDR belongs. Further, the user plane functionnetwork element matches the multicast packet with each of the PDRs inthe N4 session in descending order of priorities of the PDRs.

In a possible design, that the user plane function network elementmatches the multicast packet with the PDR on the user plane functionnetwork element includes: The user plane function network elementmatches the multicast packet with each of PDRs on the user planefunction network element in descending order of priorities of the PDRs.In other words, in this embodiment of this application, when matchingthe multicast packet with the PDR on the UPF network element, the userplane function network element directly matches the multicast packetwith each of the PDRs on the user plane function network element indescending order of priorities of the PDRs.

In a possible design, the first PDR includes a type indication, anindication to carry on matching, packet duplication information, orpacket duplication skip information. The type indication, the indicationto carry on matching, the packet duplication information, or the packetduplication skip information is used to indicate to carry on matchinganother PDR.

In a possible design, the method further includes: The user planefunction network element receives an N4 session identifier and the firstPDR from a session management function network element. The first PDR isused to detect the multicast packet. The user plane function networkelement configures the first PDR in the N4 session corresponding to theN4 session identifier. In other words, in this embodiment of thisapplication, the session management function network element mayconfigure, for the user plane function network element, the PDR that isused to detect the multicast packet.

In a possible design, the multicast packet is a broadcast packet, andcorrespondingly, the multicast address is a broadcast address.

In a possible design, the multicast packet includes a groupcast packet,and correspondingly, the multicast address is a groupcast address.

According to a second aspect, a multicast communication method isprovided. The method includes: A session management function networkelement obtains a first packet detection rule PDR. The first PDR is usedto detect a multicast packet, and the first PDR indicates to carry onmatching another PDR. The session management function network elementsends an N4 session identifier and the first PDR to a user planefunction network element. The N4 session identifier and the first PDRare used to configure the first PDR in an N4 session that iscorresponding to the N4 session identifier and that is on the user planefunction network element. In this embodiment of this application,routing rules configured by the session management function networkelement for the N4 session on the user plane function network elementinclude the first PDR that is used to detect the multicast packet, andthe first PDR indicates to carry on matching another PDR. In this way,after the multicast packet successfully matches the first PDR, the userplane function network element may carry on matching the multicastpacket with another PDR whose priority is not higher than that of thefirst PDR on the user plane function network element. In other words,according to the solution provided in this application, the multicastpacket received by the user plane function network element may match aplurality of PDRs, so that the multicast packet can be forwarded to aplurality of terminal devices according to rules (for example, FARs)associated with the plurality of PDRs. In this solution, when a terminaldevice member changes, a session management function network elementdoes not need to perform excessive operations. Therefore, compared witha solution in which indication information in a FAR needs to becorrespondingly updated when a terminal device member changes, thissolution can improve efficiency of forwarding a multicast packet, reducea signaling interaction procedure that is related to FAR updating andthat is between the session management function network element and theuser plane function network element, and reduce signaling overheads.

In a possible design, the first PDR includes a type indication, anindication to carry on matching, packet duplication information, orpacket duplication skip information. The type indication, the indicationto carry on matching, the packet duplication information, or the packetduplication skip information is used to indicate to carry on matchinganother PDR.

In a possible design, the multicast packet is a broadcast packet, andcorrespondingly, the first PDR includes a broadcast address. The methodfurther includes: The session management function network elementdetermines a first N4 session that is corresponding to a group and thatis on the user plane function network element. The broadcast packetbelongs to the group, and the first N4 session is any one of all N4sessions that are corresponding to the group and that are on the userplane function network element. Correspondingly, the N4 sessionidentifier is an identifier of the first N4 session. In other words, inthis embodiment of this application, if the multicast packet is abroadcast packet, the session management function network element needsto configure broadcast-type PDRs for all the N4 sessions that arecorresponding to the group and that are on the user plane functionnetwork element.

In a possible design, the multicast packet is a groupcast packet, andcorrespondingly, the first PDR includes a groupcast address. The methodfurther includes: The session management function network elementdetermines a second N4 session that is corresponding to a group and thatis on the user plane function network element. The groupcast packetbelongs to the group, and the second N4 session is any one of N4sessions on the user plane function network element that arecorresponding to the group and that support forwarding of the groupcastpacket. Correspondingly, the N4 session identifier is an identifier ofthe second N4 session. In other words, in this embodiment of thisapplication, if the multicast packet includes a groupcast packet, thesession management function network element needs to configuregroupcast-type PDRs for all the N4 sessions that are corresponding tothe group and that support groupcast communication.

In a possible design, that the session management function networkelement determines the second N4 session that is corresponding to thegroup and that is on the user plane function network element includes:The session management function network element determines, based on aninternet group management protocol IGMP join message, a non-accessstratum NAS message, or an application function AF message, the secondN4 session that is corresponding to the group and that is on the userplane function network element.

According to a third aspect, a communications apparatus is provided, andis configured to implement the foregoing methods. The communicationsapparatus may be the user plane function network element in the firstaspect, or an apparatus including the user plane function networkelement. Alternatively, the communications apparatus may be the sessionmanagement function network element in the second aspect, or anapparatus including the session management function network element. Thecommunications apparatus includes a corresponding module, unit, or meansfor implementing the foregoing method. The module, unit, or means may beimplemented by using hardware or software, or implemented by usinghardware by executing corresponding software. The hardware or thesoftware includes one or more modules or units corresponding to theforegoing functions.

According to a fourth aspect, a communications apparatus is provided,and includes a processor and a memory. The memory is configured to storea computer instruction, and when the processor executes the instruction,the communications apparatus is enabled to perform the method accordingto any one of the foregoing aspects. The communications apparatus may bethe user plane function network element in the first aspect, or anapparatus including the user plane function network element.Alternatively, the communications apparatus may be the sessionmanagement function network element in the second aspect, or anapparatus including the session management function network element.

According to a fifth aspect, a communications apparatus is provided, andincludes a processor. The processor is configured to: after beingcoupled to a memory and reading an instruction in the memory, perform,according to the instruction, the method according to any one of theforegoing aspects. The communications apparatus may be the user planefunction network element in the first aspect, or an apparatus includingthe user plane function network element. Alternatively, thecommunications apparatus may be the session management function networkelement in the second aspect, or an apparatus including the sessionmanagement function network element.

According to a sixth aspect, a computer readable storage medium isprovided. The computer readable storage medium stores an instruction,and when the instruction is run on a computer, the computer is enabledto perform the method according to any one of the foregoing aspects.

According to a seventh aspect, a computer program product including aninstruction is provided. When the computer program product runs on acomputer, the computer is enabled to perform the method according to anyone of the foregoing aspects.

According to an eighth aspect, a communications apparatus (for example,the communications apparatus may be a chip or a chip system) isprovided. The communications apparatus includes a processor, configuredto implement the function in any one of the foregoing aspects. In apossible design, the communications apparatus further includes a memory.The memory is configured to store a necessary program instruction andnecessary data. When the communications apparatus is a chip system, thechip system may include a chip, or may include a chip and anotherdiscrete device.

For technical effects brought by any one of the designs of the thirdaspect to the eighth aspect, refer to technical effects brought bydifferent designs of the first aspect or the second aspect. Details arenot described herein again.

According to a ninth aspect, a communication method is provided. Themethod includes: A session management function network element obtains afirst packet detection rule PDR. The first PDR is used to detect amulticast packet, and the first PDR indicates to carry on matchinganother PDR. The session management function network element sends an N4session identifier and the first PDR to a user plane function networkelement. The user plane function network element receives the N4 sessionidentifier and the first PDR from the session management functionnetwork element, and configures the first PDR in an N4 sessioncorresponding to the N4 session identifier. The user plane functionnetwork element receives the multicast packet, and matches the multicastpacket with a PDR on the user plane function network element. Themulticast packet includes a multicast address. If the multicast packetsuccessfully matches the first PDR, the user plane function networkelement carries on matching the multicast packet with another PDR.

In a possible design, the method further includes: If packet duplicationinformation corresponding to the first PDR matches sender information ofthe multicast packet, the user plane function network element duplicatesthe multicast packet, and processes a duplicated multicast packetaccording to a rule associated with the first PDR. Alternatively, ifpacket duplication information corresponding to the first PDR does notmatch sender information of the multicast packet, the user planefunction network element skips a process of processing the multicastpacket according to a rule associated with the first PDR.

In a possible design, the method further includes: If packet duplicationskip information corresponding to the first PDR does not match senderinformation of the multicast packet, the user plane function networkelement duplicates the multicast packet, and processes a duplicatedmulticast packet according to a rule associated with the first PDR.Alternatively, if packet duplication skip information corresponding tothe first PDR matches sender information of the multicast packet, theuser plane function network element skips a process of processing themulticast packet according to a rule associated with the first PDR.

In a possible design, that the user plane function network elementmatches the multicast packet with the PDR on the user plane functionnetwork element includes: The user plane function network elementdetermines an N4 session that matches the multicast packet and that ison the user plane function network element, and the user plane functionnetwork element matches the multicast packet with each of PDRs in the N4session in descending order of priorities of the PDRs.

In a possible design, that the user plane function network elementmatches the multicast packet with the PDR on the user plane functionnetwork element includes: The user plane function network elementmatches the multicast packet with each of PDRs on the user planefunction network element in descending order of priorities of the PDRs.

In a possible design, the multicast packet is a broadcast packet, andcorrespondingly, the first PDR includes a broadcast address. The methodfurther includes: The session management function network elementdetermines a first N4 session that is corresponding to a group and thatis on the user plane function network element. The broadcast packetbelongs to the group, and the first N4 session is any one of all N4sessions that are corresponding to the group and that are on the userplane function network element. Correspondingly, the N4 sessionidentifier is an identifier of the first N4 session.

In a possible design, the multicast packet is a groupcast packet, andcorrespondingly, the first PDR includes a groupcast address. The methodfurther includes: The session management function network elementdetermines a second N4 session that is corresponding to a group and thatis on the user plane function network element. The groupcast packetbelongs to the group, and the second N4 session is any one of N4sessions on the user plane function network element that arecorresponding to the group and that support forwarding of the groupcastpacket. Correspondingly, the N4 session identifier is an identifier ofthe second N4 session.

In a possible design, the first PDR includes a type indication, anindication to carry on matching, packet duplication information, orpacket duplication skip information. The type indication, the indicationto carry on matching, the packet duplication information, or the packetduplication skip information is used to indicate to carry on matchinganother PDR.

For technical effects of the ninth aspect, refer to the technicaleffects brought by any one of the possible designs of the first aspector the second aspect. Details are not described herein again.

According to a tenth aspect, a communications system is provided. Thecommunications system includes a session management function networkelement and a user plane function network element. The sessionmanagement function network element is configured to obtain a firstpacket detection rule PDR. The first PDR is used to detect a multicastpacket, and the first PDR indicates to carry on matching another PDR.The session management function network element is further configured tosend an N4 session identifier and the first PDR to the user planefunction network element. The user plane function network element isconfigured to: receive the N4 session identifier and the first PDR fromthe session management function network element, and configure the firstPDR in an N4 session corresponding to the N4 session identifier. Theuser plane function network element is further configured to: receivethe multicast packet, and match the multicast packet with a PDR on theuser plane function network element. The multicast packet includes amulticast address. The user plane function network element is furtherconfigured to: if the multicast packet successfully matches the firstPDR, carry on matching the multicast packet with another PDR.

In a possible design, the user plane function network element is furtherconfigured to: if packet duplication information corresponding to thefirst PDR matches sender information of the multicast packet, duplicatethe multicast packet, and process a duplicated multicast packetaccording to a rule associated with the first PDR. Alternatively, theuser plane function network element is further configured to: if packetduplication information corresponding to the first PDR does not matchsender information of the multicast packet, skip a process of processingthe multicast packet according to a rule associated with the first PDR.

In a possible design, the user plane function network element is furtherconfigured to: if packet duplication skip information corresponding tothe first PDR does not match sender information of the multicast packet,duplicate the multicast packet, and process a duplicated multicastpacket according to a rule associated with the first PDR. Alternatively,the user plane function network element is further configured to: ifpacket duplication skip information corresponding to the first PDRmatches sender information of the multicast packet, skip a process ofprocessing the multicast packet according to a rule associated with thefirst PDR.

In a possible design, that the user plane function network element isconfigured to match the multicast packet with the PDR on the user planefunction network element includes: The user plane function networkelement is configured to: determine an N4 session that matches themulticast packet and that is on the user plane function network element,and match the multicast packet with each of PDRs in the N4 session indescending order of priorities of the PDRs.

In a possible design, that the user plane function network element isconfigured to match the multicast packet with the PDR on the user planefunction network element includes: The user plane function networkelement is configured to match the multicast packet with each of PDRs onthe user plane function network element in descending order ofpriorities of the PDRs.

In a possible design, the multicast packet is a broadcast packet, andcorrespondingly, the first PDR includes a broadcast address. The sessionmanagement function network element is further configured to: determinea first N4 session that is corresponding to a group and that is on theuser plane function network element. The broadcast packet belongs to thegroup, and the first N4 session is any one of all N4 sessions that arecorresponding to the group and that are on the user plane functionnetwork element. Correspondingly, the N4 session identifier is anidentifier of the first N4 session.

In a possible design, the multicast packet is a groupcast packet, andcorrespondingly, the first PDR includes a groupcast address. The sessionmanagement function network element is further configured to determine asecond N4 session that is corresponding to a group and that is on theuser plane function network element. The groupcast packet belongs to thegroup, and the second N4 session is any one of N4 sessions on the userplane function network element that are corresponding to the group andthat support forwarding of the groupcast packet. Correspondingly, the N4session identifier is an identifier of the second N4 session.

In a possible design, the first PDR includes a type indication, anindication to carry on matching, packet duplication information, orpacket duplication skip information. The type indication, the indicationto carry on matching, the packet duplication information, or the packetduplication skip information is used to indicate to carry on matchinganother PDR.

For technical effects of the tenth aspect, refer to the technicaleffects brought by any one of the possible designs of the first aspector the second aspect. Details are not described herein again.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic flowchart of forwarding a packet on a user planedefined in existing 3GPP TS29.244;

FIG. 2a is a schematic diagram of a user plane architecture of anexisting 5G VN service;

FIG. 2b is a schematic diagram of communication in an existing broadcastscenario;

FIG. 2c is a schematic diagram of communication in an existing groupcastscenario;

FIG. 3a is a schematic diagram of a user-level N4 session according toan embodiment of this application;

FIG. 3b is a schematic diagram of a group-level N4 session according toan embodiment of this application;

FIG. 4 is a schematic structural diagram of an N4 session according toan embodiment of this application;

FIG. 5 is a schematic flowchart 1 of configuring a routing ruleaccording to an embodiment of this application;

FIG. 6 is a schematic flowchart 2 of configuring a routing ruleaccording to an embodiment of this application;

FIG. 7 is a schematic architectural diagram of a communications systemaccording to an embodiment of this application;

FIG. 8 is a schematic diagram of application of a communications systemin a 5G network according to an embodiment of this application;

FIG. 9 is a schematic structural diagram of a communications deviceaccording to an embodiment of this application;

FIG. 10 is a schematic flowchart 1 of a multicast communication methodaccording to an embodiment of this application;

FIG. 11 is a schematic flowchart 2 of a multicast communication methodaccording to an embodiment of this application;

FIG. 12 is a schematic flowchart 3 of a multicast communication methodaccording to an embodiment of this application;

FIG. 13 is a schematic flowchart 4 of a multicast communication methodaccording to an embodiment of this application;

FIG. 14 is a schematic flowchart 5 of a multicast communication methodaccording to an embodiment of this application;

FIG. 15 is a schematic diagram 1 of an example of a multicastcommunication method according to an embodiment of this application;

FIG. 16 is a schematic diagram 2 of an example of a multicastcommunication method according to an embodiment of this application;

FIG. 17 is a schematic structural diagram of a user plane functionnetwork element according to an embodiment of this application; and

FIG. 18 is a schematic structural diagram of a session managementfunction network element according to an embodiment of this application.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

For ease of understanding of technical solutions in embodiments of thisapplication, the following first briefly describes technologies relatedto this application.

1.5G Virtual Network (5G Virtual Network, 5G VN):

A 5G VN service is a service provided by a current 5G network, and ismainly used in home communication, enterprise office, factorymanufacturing, internet of vehicles, power grid reconstruction, a publicsecurity organization, and the like. The 5G VN service can provideprivate communications of an internet protocol (IP) type or a non-IPtype (for example, an Ethernet type) for two or more terminal devices ina group. For example, devices in a factory may constitute a group, andthe devices in the group may send an Ethernet data packet to each other.Alternatively, office devices (such as mobile phones, computers, orlaptop computers) of employees in a department of an enterprise mayconstitute a group, and the office devices send an IP packet to eachother. If two terminal devices are not in a same group, the two terminaldevices cannot communicate with each other.

FIG. 2a is a schematic diagram of a user plane architecture of anexisting 5G VN service. A terminal device establishes a session on a UPFnetwork element that provides the 5G VN service, to access the UPFnetwork element that provides the 5G VN service. The UPF network elementthat provides the 5G VN service may interwork with an existing localarea network (LAN) in a data network (DN) through an N6 interface, forexample, communicate with a personal computer (PC) in the LAN.Alternatively, the UPF network element that provides the 5G VN servicemay associate sessions of different terminal devices through an internalinterface of the UPF network element or a connection between UPF networkelements, to implement private communication. This is not specificallylimited in the embodiments of this application.

In terms of expression, 5G VNs may also be referred to as a 5G VN group,5G local area networks (5GLAN), a 5G LAN group, local area networks(LAN), a 5G LAN-VN LAN group, LAN-type services (type service), LAN-VNs,5G LAN-type services (type service), or the like. A name of the 5G VN isnot specifically limited in the embodiments of this application.

2. Broadcast:

Broadcast is a one-to-many communication mode. On a network, one localarea network (for example, a 5G VN) corresponds to one broadcast domain.Terminal devices subscribed to the LAN may constitute a broadcast group(which may also be referred to as a LAN group). The terminal devicesubscribed to the LAN may be referred to as a terminal member of thebroadcast group. In other words, the terminal device joins the broadcastgroup (the terminal device may join one or more broadcast groups) in asubscription process. For related implementation, refer to an existingsolution. Details are not described herein.

Any terminal device that has accessed a network in the broadcast groupmay serve as a broadcast source to send a broadcast packet, and may alsoserve as a broadcast member to receive a broadcast packet. For example,it is assumed that terminal members that have accessed a network in thebroadcast group include a terminal device 1, a terminal device 2, aterminal device 3, a terminal device 4, a terminal device 5, and aterminal device 6. For example, the terminal device 1 serves as abroadcast source. A corresponding schematic diagram of communication maybe shown in FIG. 2b . To be specific, a broadcast packet sent by theterminal device 1 may be transmitted to the terminal device 2, theterminal device 3, the terminal device 4, the terminal device 5, and theterminal device 6 in the broadcast group.

It should be noted that, in the embodiments of this application, that aterminal member in the broadcast group accesses a network meansestablishing a user plane connection. A typical network access manner isthat the terminal device initiates a packet data unit (PDU) sessionestablishment request. For details, refer to an existing implementation.Details are not described herein.

A broadcast address in the embodiments of this application may be adestination IP address that is all is, for example, 255.255.255.255.Alternatively, the broadcast address in the embodiments of thisapplication may be a destination media access control (MAC) address thatis all 1s, for example, 0xff: 0xff: 0xff: 0xff: 0xff: 0xff.Alternatively, the broadcast address in the embodiments of thisapplication may be a broadcast address of a subnet. For details, referto an existing definition of the broadcast address. Details are notdescribed herein.

3. Groupcast:

In the embodiments of this application, one groupcast source and aplurality of groupcast members may constitute one groupcast group (whichmay also be referred to as a groupcast group for short). A source thatsends an IP packet with an address of the groupcast group as adestination address is referred to as a groupcast source, and agroupcast user that receives groupcast data is referred to as agroupcast member. In other words, groupcast has a direction, and thedirection is from a groupcast source to groupcast members. Roles of thegroupcast source and the groupcast group members are notinterchangeable. Otherwise, the groupcast source and the groupcast groupmembers belong to different groupcast groups. For example, it is assumedthat terminal members in the LAN group include a terminal device 1, aterminal device 2, a terminal device 3, a terminal device 4, a terminaldevice 5, and a terminal device 6. For example, the terminal device 1serves as a groupcast source, and the terminal device 3, the terminaldevice 5, and the terminal device 6 serve as groupcast members toconstitute a groupcast group. A corresponding schematic diagram ofcommunication may be shown in FIG. 2c . To be specific, a groupcastpacket sent by the terminal device 1 may be transmitted to the terminaldevice 3, the terminal device 5, and the terminal device 6 in thegroupcast group.

In the embodiments of this application, the groupcast source isdetermined by an application layer of an open systems interconnection(OSI) model. If the terminal device needs to receive a groupcast packet,the terminal device may explicitly send an internet group managementprotocol (IGMP) join message to a network. Only after recording that theterminal device joins a groupcast group, the network forwards, to theterminal device, a groupcast packet sent by the groupcast source. Inother words, the groupcast member dynamically joins the groupcast group.For details, refer to an existing implementation, and details are notdescribed herein again.

The groupcast address in the embodiments of this application may be agroupcast IP version 4 (IPv4) address assigned by the internet assignednumbers authority (IANA), and ranges from 224.0.0.0 to 239.255.255.255.Alternatively, the groupcast address in the embodiments of thisapplication may be a groupcast MAC address whose last bit in mostsignificant 24 bits in 48 bits is always 1. Alternatively, the groupcastaddress in the embodiments of this application may be a reservedgroupcast address, for example, a groupcast MAC address whose mostsignificant 24 bits are 0x01005e or 224.0.0.1. Alternatively, thegroupcast address in the embodiments of this application may be anotheraddress. For details, refer to an existing definition of the groupcastaddress. Details are not described herein.

4. Multicast:

Multicast in the embodiments of this application includes the foregoingbroadcast or groupcast. If the multicast includes the foregoingbroadcast, a corresponding multicast address may be referred to as abroadcast address, and a corresponding multicast packet may be referredto as a broadcast packet. Alternatively, if the multicast includes theforegoing groupcast, a corresponding multicast address may be referredto as a groupcast address, and a corresponding multicast packet may bereferred to as a groupcast packet. A general description is providedherein, and details are not described below again.

5. N4 Session:

The N4 session in the embodiments of this application includes auser-level N4 session and a group-level N4 session. In the current 5Gnetwork, the N4 session is created by a session management function(SMF) network element on the UPF network element.

For example, the user-level N4 session on the UPF network element may bespecifically an N4 session that is created, when the terminal deviceestablishes a PDU session, by the SMF network element on the UPF networkelement and that is corresponding to the PDU session. A function of theN4 session is follows: The UPF network element receives, through theuser-level N4 session, a packet (for example, a broadcast packet or agroupcast packet) sent by the terminal device, and the UPF networkelement sends a packet (for example, a broadcast packet or a groupcastpacket) to the terminal device through the user-level N4 session.

In an example, when the terminal device establishes a PDU session, theSMF network element may indicate the UPF network element to create an N4session (namely, the user-level N4 session) corresponding to the PDUsession. When receiving a request for deleting the PDU session of theterminal device, the SMF network element triggers the UPF networkelement to delete the N4 session corresponding to the PDU session. Inthe embodiments of this application, one UPF network element may includeone or more N4 sessions corresponding to a PDU session or PDU sessions.For example, if a plurality of terminal devices are connected to a sameUPF network element, the UPF network element needs to create an N4session corresponding to a PDU session of each terminal device.

For example, in FIG. 3a , a terminal device 1 and a terminal device 6are connected to a UPF network element 1. In this case, when creating aPDU session of the terminal device 1, the SMF network element mayindicate the UPF network element 1 to create an N4 session 1corresponding to the PDU session of the terminal device 1. When creatinga PDU session of the terminal device 6, the SMF network element mayindicate the UPF network element 1 to create an N4 session 6corresponding to the PDU session of the terminal device 6.

For ease of description, in the embodiments of this application, the N4session corresponding to the PDU session of the terminal device 1 may bereferred to as an N4 session of the terminal device 1, the N4 sessioncorresponding to the PDU session of the terminal device 6 may bereferred to as an N4 session of the terminal device 6, and so on. Ageneral description is provided herein, and details are not describedbelow again.

Alternatively, to support communication between different UPF networkelements and communication between a UPF network element and a DN in the5G VN service, the SMF network element further needs to create, on eachUPF network element that provides the 5G VN service, a group-level N4session for a corresponding 5G VN group.

In an example, when creating a first PDU session anchored on the UPFnetwork element in the 5G VN group, the SMF network element may indicatethe UPF network element to create a group-level N4 session correspondingto the 5G VN group. In addition, when releasing a last PDU sessionanchored on the UPF network element in the 5G VN group, the SMF networkelement may indicate the UPF network element to delete a group-level N4session corresponding to the 5G VN group. In the embodiments of thisapplication, one UPF network element may include one or more group-levelN4 sessions. For example, if one UPF network element serves a pluralityof 5G VN groups, the UPF network element needs to create a plurality ofgroup-level N4 sessions, where each N4 session is corresponding to one5G VN group. In the embodiments of this application, a plurality ofgroup-level N4 sessions may be created for one 5G VN group.

For example, as shown in FIG. 3b , it is assumed that when creating aPDU session of a terminal device 1, the SMF network element hasindicated a UPF network element 1 to create an N4 session 1corresponding to the PDU session of the terminal device 1. Then, whencreating a PDU session of a terminal device 2, the SMF network elementmay indicate a UPF network element 2 to create an N4 session 2corresponding to the PDU session of the terminal device 2. In addition,because the terminal device 1 in the 5G VN group has accessed the UPFnetwork element 1, the SMF network element needs to indicate the UPFnetwork element 2 to create a group-level N4 session 3 corresponding tothe 5G VN group, and the SMF network element indicates the UPF networkelement 1 to create a group-level N4 session 4 corresponding to the 5GVN group. Alternatively, optionally, if the 5G VN group needs tocommunicate with the DN, the SMF network element may indicate the UPFnetwork element 1 to create a group-level N4 session 4 corresponding tothe 5G VN group. This is not specifically limited herein.

6. Routing Rule:

The N4 session in the embodiments of this application includes a routingrule, and the routing rule is used to detect a data packet and forwardthe data packet. When indicating the UPF network element to create an N4session, the SMF network element may configure a corresponding routingrule for the N4 session. A routing rule in a user-level N4 session maybe used to detect and forward a data packet related to a PDU session ofthe terminal device. A routing rule in a group-level N4 session is usedto detect and forward a data packet that is related to an N19 tunnel oran N6 interface and that belongs to the 5G VN group.

It should be noted that a data packet and a packet in the embodiments ofthis application have a same meaning, and are interchangeable. A generaldescription is provided herein, and details are not described belowagain.

It should be noted that, in the embodiments of this application, aninternal interface of the UPF network element is a virtual port or aspecific port on the UPF network element, and is used by the UPF networkelement to locally forward a received data packet. That the data packetis locally forwarded to the internal interface of the UPF networkelement means that the UPF network element receives the data packetagain through the internal interface, so that the data packet isdetected again by the UPF network element, to match a correspondingrouting rule, and be forwarded along a correct path. Beforere-detection, the UPF network element may decapsulate an external tunnelheader for the data packet. Optionally, new external tunnel headerinformation may be re-encapsulated for the data packet. The new tunnelinformation may be included in a FAR in the routing rule, or may begenerated by the UPF network element based on forwarding indicationinformation in a FAR. This is not specifically limited herein.

It should be noted that, in the embodiments of this application, theremay be one or more groups of routing rules in the N4 session, and eachgroup of routing rules include a PDR and a FAR associated with the PDR.Optionally, each group of routing rules may further include a QER and aURR associated with the PDR. A general description is provided herein,and details are not described below again. A possible type of the PDRincluded in the routing rules is unicast, and this type of PDR is usedto detect a unicast packet. Another possible type of the PDR included inthe routing rules is multicast, and this type of PDR is used to detect amulticast packet. For related descriptions, refer to subsequentembodiments. Details are not described herein.

PDRs in the embodiments of this application may include an uplink (UL)PDR and a downlink (DL) PDR. Correspondingly, a FAR, a QER, and a URRassociated with the UL PDR may be respectively referred to as a UL FAR,a UL QER, and a UL URR. A FAR, a QER, and a URR associated with the DLPDR may be respectively referred to as a DL FAR, a DL QER, and a DL URR.A general description is provided herein, and details are not describedbelow again.

For example, as shown in FIG. 4, the N4 session may include a UL PDR 1,and a UL FAR 1, a UL QER 1, and a UL URR 1 that are associated with theUL PDR 1; a DL PDR 1, and a DL FAR 1, a DL QER 1, and a DL URR 1 thatare associated with the DL PDR 1; . . . , a UL PDR n, and a UL FAR n, aUL QER n, and a UL URR n that are associated with the UL PDR n; and a DLPDR n, and a DL FAR n, a DL QER n, and a DL URR n that are associatedwith the DL PDR n.

The following further describes the routing rule in the user-level N4session and the routing rule in the group-level N4 session.

Case 1: For the User-Level N4 Session:

An existing UL PDR is used to detect a unicast packet and a multicastpacket received from a PDU session tunnel, and may specifically includea source interface parameter, a tunnel information parameter, networkinstance information, and a filter parameter or an address of a terminaldevice. The source interface parameter is set to “access side” or “coreside”. The tunnel information parameter is set to a tunnel generalpacket radio service (GPRS) tunneling protocol-user plane (GPRStunneling protocol user, GTP-U) TEID of the PDU session on the UPFnetwork element side. The network instance information is set to a valuecorresponding to the 5G VN group. In the filter parameter, for example,an address of the terminal device may be used as a source address. Theaddress of the terminal device may include, for example, an IP addressor a MAC address. A general description is provided herein, and detailsare not described below again.

A UL FAR associated with the UL PDR includes network instanceinformation and a destination interface parameter, and is used totransmit a data packet that matches the UL PDR to a destinationinterface. The SMF network element sets the network instance informationto a value corresponding to the 5G VN group, and sets a value of thedestination interface parameter to a value (for example, “5G VNinternal”) corresponding to the internal interface of the UPF networkelement. It may be understood that the UL FAR in the user-level N4session is used to locally forward, to the internal interface of the UPFnetwork element, a data packet that is received from the PDU sessiontunnel and that matches the UL PDR in the N4 session.

An existing DL PDR is used to detect a unicast packet received from theinternal interface, and specifically includes a source interfaceparameter, network instance information, and a filter parameter or theaddress of the terminal device. The source interface parameter is set to“5G VN internal”. The network instance information is set to a valuecorresponding to the 5G VN group. In the filter parameter, for example,the address of the terminal device may be used as a destination address.

A DL FAR associated with the DL PDR includes network instanceinformation, a destination interface parameter, and/or an externaltunnel parameter, and is used to transmit, to a destination interface, adata packet that is received from the internal interface and thatmatches the DL PDR. The network instance information is set to a valuecorresponding to the 5G VN group. A value of the destination interfaceparameter is set to “access side” or “core side”. A value of theexternal tunnel parameter is set to tunnel information (for example, ageneral packet radio service (GPRS) tunneling protocol-user plane (GPRStunneling protocol user, GTP-U) TEID of a PDU session on an accessdevice or the UPF network element) of the PDU session. It may beunderstood that the DL FAR in the N4 session corresponding to the PDUsession is used to transmit, to a specified PDU session tunnel, a datapacket that is received from the internal interface and that matches theDL PDR in the N4 session.

However, in the embodiments of this application, a DL PDR of a multicasttype is introduced. The DL PDR is used to detect a multicast packetreceived from the internal interface, and may specifically include asource interface parameter, a filter parameter, network instanceinformation, and indication information. The source interface parameteris set to “5G VN internal”. The network instance information is set to avalue corresponding to the 5G VN group. In the filter parameterinformation, a broadcast address or a groupcast address specified by theSMF network element is used as a destination address. The indicationinformation may include one or more of a type indication, an indicationto carry on matching, packet duplication information, or packetduplication skip information. For example, the indication informationincludes the packet duplication information and the type indication.Alternatively, the indication information includes the packetduplication information and the indication to carry on matching.Alternatively, the indication information includes the packetduplication skip information and the type indication. Alternatively, theindication information includes the packet duplication skip informationand the indication to carry on matching. This is not specificallylimited in the embodiments of this application. For related descriptionsof the DL FAR associated with the DL PDR, refer to the foregoingdescriptions of the DL FAR associated with the DL PDR that is used todetect a unicast packet. Details are not described herein again.

Case 2: For the Group-Level N4 Session:

An existing UL PDR is used to detect a unicast packet received from theinternal interface, and may specifically include a source interfaceparameter, network instance information, and a filter parameter. Thesource interface parameter is set to “5G VN internal”. The networkinstance information is set to a value corresponding to the 5G VN group.In the filter parameter, for example, an address of the terminal devicemay be used as a destination address.

A UL FAR associated with the UL PDR includes network instanceinformation, a destination interface parameter, and/or an externaltunnel parameter, and is used to forward, to a destination interface, adata packet that is received from the internal interface and thatmatches the UL PDR. The network instance information is set to a valuecorresponding to the 5G VN group. A value of the destination interfaceparameter is set to “core side”. A value of the external tunnelparameter is set to information about an N19 tunnel (for example, aGTP-U TEID of an N19 tunnel connecting the current UPF network elementto another UPF network element). It may be understood that the UL FAR inthe group-level N4 session is used to forward a data packet that matchesthe UL PDR in the group-level N4 session to the N19 tunnel connectingthe UPF network element to the another UPF network element or an N6interface connecting the UPF network element to a DN.

However, in the embodiments of this application, a UL PDR of a multicasttype is introduced. The UL PDR is used to detect a multicast packetreceived from the internal interface, and may specifically include asource interface parameter, network instance information, a filterparameter, and indication information. The source interface parameter isset to “5G VN internal”. The network instance information is set to avalue corresponding to the 5G VN group. In the filter parameterinformation, a broadcast address or a groupcast address specified by theSMF network element is used as a destination address. The indicationinformation may include one or more of a type indication, an indicationto carry on matching, packet duplication information, or packetduplication skip information. For example, the indication informationincludes the packet duplication information and the type indication.Alternatively, the indication information includes the packetduplication information and the indication to carry on matching.Alternatively, the indication information includes the packetduplication skip information and the type indication. Alternatively, theindication information includes the packet duplication skip informationand the indication to carry on matching. This is not specificallylimited in the embodiments of this application. For related descriptionsof the UL FAR associated with the UL PDR, refer to the foregoingdescriptions of the UL FAR associated with the UL PDR that is used todetect a unicast packet. Details are not described herein again.

An existing DL PDR is used to detect a unicast packet or a multicastpacket received from an N19 tunnel or an N6 interface, and specificallyincludes a source interface parameter, network instance information,and/or a tunnel information parameter. The source interface parameter isset to “5G VN internal”. The network instance information is set to avalue corresponding to the 5G VN group. The tunnel information parameteris set to a GTP-U TEID of the N19 tunnel on the UPF network elementside.

A DL FAR associated with the DL PDR includes a destination interfaceparameter, and is used to transmit, to a destination interface, a datapacket that is received from the N19 tunnel or the N6 interface and thatmatches the DL PDR. The SMF network element sets a value of thedestination interface parameter to a value (for example, “5G VNinternal”) corresponding to the internal interface of the UPF networkelement. It may be understood that the DL FAR in the group-level N4session is used to locally forward a data packet that matches the DL PDRin the group-level N4 session to the internal interface of the UPFnetwork element.

However, in the embodiments of this application, a DL PDR of a multicasttype is introduced. The DL PDR is used to detect a multicast packetreceived from the N19 tunnel or the N6 interface, and may specificallyinclude a source interface parameter, network instance information, afilter parameter, and/or a tunnel information parameter. The sourceinterface parameter is set to “N6 LAN” or “core side”. The networkinstance information is set to a value corresponding to the 5G VN group.In the filter parameter, a broadcast address or a groupcast addressspecified by the SMF network element is used as a destination address.The tunnel information parameter is set to a GTP-U TEID of the N19tunnel on the UPF network element side. For related descriptions of theDL FAR associated with the DL PDR, refer to the foregoing descriptionsof the DL FAR associated with the DL PDR that is used to detect aunicast packet. A difference lies in, for example, that the DL FARassociated with the DL PDR of a multicast type is used to locallyforward, to the internal interface of the UPF network element, a datapacket that matches the DL PDR in the group-level N4 session, togetherwith N19 indication information or N6 indication information. Detailsare not described herein again. For example, the N19 indicationinformation in the embodiments of this application may be, the GTP-UTEID of the N19 tunnel connecting the current UPF network element to theanother UPF network element, and the N6 indication information in theembodiments of this application may be, for example, information aboutthe N6 interface.

In addition, for related descriptions of the N4 session corresponding tothe PDU session and the group-level N4 session, the UL QER and the ULURR that are associated with the UL PDR, and the DL QER and the DL URRthat are associated with the DL PDR, refer to the prior art. Details arenot described herein.

7. Process of Matching a Data Packet with a PDR:

In the prior art, after receiving a data packet, the UPF network elementdetects the data packet, and determines that the data packet matches aPDR (In other words, the data packet successfully matches the PDR, orthe PDR successfully matches the data packet). Specifically, thefollowing four matching processes are included:

(1) The data packet is detected based on PDU session tunnel information,network instance information, interface information, and/or headerinformation of the data packet. If the PDU session tunnel information,the network instance information, the interface information, and/or theheader information of the data packet respectively match/matchescorresponding parameters/a corresponding parameter in a UL PDR of an N4session corresponding to a PDU session, the UL PDR of the N4 sessioncorresponding to the PDU session successfully matches the data packet.

(2) The data packet is detected based on interface information, networkinstance information, and header information of the data packet. If theinterface information, the network instance information, and the headerinformation respectively match corresponding parameters in a DL PDR ofan N4 session corresponding to a PDU session, the DL PDR of the N4session corresponding to the PDU session successfully matches the datapacket.

(3) The data packet is detected based on interface information, networkinstance information, and header information of the data packet. If theinterface information, the network instance information, and the headerinformation of the data packet respectively match correspondingparameters in a UL PDR of a group-level N4 session, the UL PDR of thegroup-level N4 session successfully matches the data packet.

(4) The data packet is detected based on interface information, networkinstance information, and/or N19 tunnel information of the data packet.If the interface information, the network instance information, and/orthe tunnel information of the data packet respectively match/matchescorresponding parameters/a corresponding parameter in a DL PDR of agroup-level N4 session, the DL PDR of the group-level N4 sessionsuccessfully matches the data packet.

In a specific implementation process, the UPF network element performsone or more of the foregoing four matching processes, to match the datapacket with the PDR.

In the embodiments of this application, the foregoing parameter-relatedmatching are performed. In addition, if the data packet includes amulticast address, only when the interface information, the networkinstance information, the multicast address in the header information ofthe data packet, and/or the N19 tunnel information of the data packetare/is respectively equal to corresponding parameters/a correspondingparameter in the PDR (including the UL PDR and the DL PDR), it isconsidered that the PDR successfully matches the data packet.

8. Configuring of a Routing Rule on the UPF Network Element:

When indicating the UPF network element to create an N4 session, the SMFnetwork element may configure a corresponding routing rule for the N4session.

As shown in FIG. 5, the following steps are included for a user-level N4session.

S501: When establishing a PDU session of a terminal device, the SMFnetwork element determines an N4 session corresponding to a group towhich the terminal device belongs, and then sends an N4 sessionestablishment (N4 session establishment) request 1 to the UPF networkelement. The UPF network element receives the N4 session establishmentrequest 1 from the SMF network element.

The N4 session establishment request 1 includes an N4 session identifierand a UL PDR that are corresponding to the N4 session, and is used torequest to establish, on the UPF network element, an N4 sessioncorresponding to the N4 session identifier.

The UL PDR includes an identifier of a rule associated with the UL PDR,and the rule associated with the UL PDR may include, for example, a ULFAR. Optionally, the rule associated with the UL PDR may further includea UL URR and a UL QER.

Optionally, if the UPF network element does not include the UL FARcorresponding to an identifier of the UL FAR, the UL URR correspondingto an identifier of the UL URR, or the UL QER corresponding to anidentifier of the UL QER, the N4 session establishment request 1 mayfurther include the UL FAR, the UL URR, or the UL QER associated withthe UL PDR. This is not specifically limited herein.

S502: After receiving an access device side tunnel information of thePDU session of the terminal device, the SMF network element determinesthe N4 session corresponding to the group to which the terminal devicebelongs, and then sends an N4 session modification (N4 sessionmodification) request 1 to the UPF network element. The UPF networkelement receives the N4 session modification request 1 from the SMFnetwork element.

The N4 session modification request 1 includes the N4 session identifierand a DL PDR that are corresponding to the N4 session, and is used torequest to modify, on the UPF network element, the N4 sessioncorresponding to the N4 session identifier.

The DL PDR includes an identifier of a rule associated with the DL PDR,and the rule associated with the DL PDR may include, for example, a DLFAR. Optionally, the rule associated with the DL PDR may further includea DL URR and a DL QER.

Optionally, if the UPF network element does not include the DL FARcorresponding to an identifier of the DL FAR, the DL URR correspondingto an identifier of the DL URR, or the DL QER corresponding to anidentifier of the DL QER, the N4 session modification request 1 mayfurther include the DL FAR, the DL URR, or the DL QER associated withthe DL PDR. This is not specifically limited herein.

Certainly, if the N4 session needs to be updated (for example, a routingrule needs to be added or a routing rule needs to be deleted)subsequently, the SMF network element may send an N4 sessionmodification request to the UPF network element, to update the N4session. Alternatively, when the SMF network element releases the PDUsession of the terminal device, the SMF network element may send an N4session release (N4 session release) request to the UPF network element.The N4 session release request is used to request the UPF networkelement to delete all contexts of the N4 session. This is notspecifically limited in this embodiment of this application.

Alternatively, as shown in FIG. 6, the following steps are included fora group-level N4 session.

S601: When determining that the UPF network element provides a servicefor a 5G VN group for the first time, the SMF network element determinesan N4 session corresponding to the 5G VN group, and then sends an N4session establishment 2 to the UPF network element. The UPF networkelement receives the N4 session establishment request 2 from the SMFnetwork element.

The N4 session establishment request 2 includes an N4 sessionidentifier, a UL PDR, and a DL PDR that are corresponding to the N4session, and is used to request to establish, on the UPF networkelement, an N4 session corresponding to the N4 session identifier.

The UL PDR includes an identifier of a rule associated with the UL PDR.The DL PDR includes an identifier of a rule associated with the DL PDR.For related descriptions of the rule associated with the UL PDR and therule associated with the DL PDR, refer to the foregoing embodiment.Details are not described herein again.

Optionally, if the UPF network element does not include a UL FARcorresponding to an identifier of the UL FAR, a UL URR corresponding toan identifier of the UL URR, or a UL QER corresponding to an identifierof the UL QER, the N4 session establishment request 2 may furtherinclude the UL FAR, the UL URR, or the UL QER associated with the ULPDR. This is not specifically limited herein.

Optionally, if the UPF network element does not include a DL FARcorresponding to an identifier of the DL FAR, a DL URR corresponding toan identifier of the DL URR, or a DL QER corresponding to an identifierof the DL QER, the N4 session establishment request 2 may furtherinclude the DL FAR, the DL URR, or the DL QER associated with the DLPDR. This is not specifically limited herein.

S602: When determining that there is a new address of a terminal deviceand/or a new N19 tunnel in the 5G VN group, the SMF network elementdetermines the N4 session corresponding to the 5G VN group, and thensends an N4 session modification request 2 to the UPF network element.The UPF network element receives the N4 session modification request 2from the SMF network element.

The N4 session modification request 2 includes the N4 sessionidentifier, the UL PDR, and the DL PDR that are corresponding to the N4session. These routing rules are related to the new address of theterminal device and/or the new N19 tunnel.

The UL PDR includes the identifier of the rule associated with the ULPDR. The DL PDR includes the identifier of the rule associated with theDL PDR. For related descriptions of the rule associated with the UL PDRand the rule associated with the DL PDR, refer to the foregoingembodiment. Details are not described herein again.

Optionally, if the UPF network element does not include the UL FARcorresponding to the identifier of the UL FAR, the UL URR correspondingto the identifier of the UL URR, or the UL QER corresponding to theidentifier of the UL QER, the N4 session modification request 2 mayfurther include the UL FAR, the UL URR, or the UL QER associated withthe UL PDR. This is not specifically limited herein.

Optionally, if the UPF network element does not include the DL FARcorresponding to the identifier of the DL FAR, the DL URR correspondingto the identifier of the DL URR, or the DL QER corresponding to theidentifier of the DL QER, the N4 session modification request 2 mayfurther include the DL FAR, the DL URR, or the DL QER associated withthe DL PDR. This is not specifically limited herein.

S603: When determining to release an N19 tunnel or an address of theterminal device in the 5G VN group, the SMF network element determinesthe N4 session corresponding to the 5G VN group, and then sends an N4session modification request 3 to the UPF network element. The UPFnetwork element receives the N4 session modification request 3 from theSMF network element.

The N4 session modification request 3 includes the N4 sessionidentifier, the UL PDR, and the DL PDR that are corresponding to the N4session. These routing rules are related to the to-be-released addressof the terminal device and/or the to-be-released N19 tunnel.

The UL PDR includes the identifier of the rule associated with the ULPDR. The DL PDR includes the identifier of the rule associated with theDL PDR. For related descriptions of the rule associated with the UL PDRand the rule associated with the DL PDR, refer to the foregoingembodiment. Details are not described herein again.

Optionally, if the UPF network element does not include the UL FARcorresponding to the identifier of the UL FAR, the UL URR correspondingto the identifier of the UL URR, or the UL QER corresponding to theidentifier of the UL QER, the N4 session modification request 3 mayfurther include the UL FAR, the UL URR, or the UL QER associated withthe UL PDR. This is not specifically limited herein.

Optionally, if the UPF network element does not include the DL FARcorresponding to the identifier of the DL FAR, the DL URR correspondingto the identifier of the DL URR, or the DL QER corresponding to theidentifier of the DL QER, the N4 session modification request 3 mayfurther include the DL FAR, the DL URR, or the DL QER associated withthe DL PDR. This is not specifically limited herein.

Certainly, if the N4 session needs to be updated (for example, a routingrule needs to be added or a routing rule needs to be deleted)subsequently, the SMF network element may send an N4 sessionmodification request to the UPF network element, to update the N4session. Alternatively, if the SMF network element determines to releasea last PDU session in the 5G VN group on the UPF network element, theSMF network element may send an N4 session release request to the UPFnetwork element. The N4 session release request is used to request theUPF network element to delete all contexts of the N4 session. This isnot specifically limited in this embodiment of this application.

Optionally, in this embodiment of this application, if multicast isbroadcast, the SMF network element needs to configure, for alluser-level N4 sessions and one group-level N4 session that arecorresponding to the group that are on the UPF network element, PDRsused to detect a broadcast packet. The PDRs of a broadcast type include:a UL PDR used to receive and process an uplink broadcast packet, and aDL PDR used to receive and process a downlink broadcast packet. The ULPDR includes an identifier of a rule associated with the UL PDR, and theDL PDR includes an identifier of a rule associated with the DL PDR.Certainly, if the SMF network element determines that the terminaldevice does not support forwarding of a broadcast packet, the SMFnetwork element does not configure the PDR of a broadcast type for theuser-level N4 session of the terminal device. Alternatively, if the SMFnetwork element determines that the UPF network element does not supportforwarding of a broadcast packet through an N6 tunnel or forwarding of abroadcast packet through the N19 tunnel, the SMF network element doesnot configure the PDR of a broadcast type for the group-level N4 sessionof the terminal device.

Alternatively, optionally, in this embodiment of this application, ifmulticast is groupcast, the SMF network element needs to configure PDRsof a groupcast type for all user-level N4 sessions and one group-levelN4 session that are corresponding to the group and that supportgroupcast communication. The PDRs of a groupcast type include: a UL PDRused to receive and process an uplink groupcast packet, and a DL PDRused to receive and process a downlink groupcast packet. The UL PDRincludes an identifier of a rule associated with the UL PDR, and the DLPDR includes an identifier of a rule associated with the DL PDR.Certainly, if the SMF network element determines that the UPF networkelement does not support forwarding of a groupcast packet through the N6tunnel or forwarding of a groupcast packet through the N19 tunnel, theSMF network element does not configure the PDR of a groupcast type forthe group-level N4 session of the terminal device.

In addition, in this embodiment of this application, if the SMF networkelement determines that the terminal device joins a groupcast group, theSMF network element may add the PDR of a groupcast type to the N4session of the PDU session of the terminal device after determining agroupcast address of the groupcast group. Alternatively, if the SMFnetwork element determines that the terminal device leaves a groupcastgroup, the SMF network element may delete the PDR of a groupcast typefrom the N4 session of the terminal device after determining a groupcastaddress of the groupcast group. These PDRs of a groupcast type includethe groupcast address.

Optionally, the SMF network element may determine, in the followingmanners, that the terminal device joins/leaves a groupcast group:

The SMF network element receives a non-access stratum (NAS) request, forexample, a PDU session establishment/modification message, from theterminal device, to determine that the terminal device joins/leaves agroup.

Alternatively, the SMF network element receives an IGMP join/leavemessage from the UPF network element, to determine that the terminaldevice joins/leaves a group.

Alternatively, the SMF network element receives indication information,for example, a policy and charging control (policy control charge, PCC)rule or event subscription information, from a policy control function(PCF) network element/network exposure function (NEF) network element,to determine that the terminal device joins or leaves a group.

This embodiment of this application imposes no limitation on a manner ofdetermining, by the SMF network element, that the terminal devicejoins/leaves a group.

The following describes the technical solutions in the embodiments ofthis application with reference to the accompanying drawings in theembodiments of this application. In the description of this application,“/” represents an “or” relationship between associated objects unlessotherwise specified. For example, A/B may represent A or B. The term“and/or” in this application indicates only an association relationshipfor describing associated objects and indicates that three relationshipsmay exist. For example, A and/or B may indicate the following threecases: Only A exists, both A and B exist, and only B exists, where A andB may be singular or plural. In addition, unless otherwise specified, “aplurality of” in the description of this application means two or morethan two. The term “at least one piece (item) of the following” or asimilar expression thereof indicates any combination of these items,including any combination of a singular item (piece) or plural items(pieces). For example, at least one (one piece) of a, b, or c mayindicate: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c may besingular or plural. In addition, to clearly describe the technicalsolutions in the embodiments of this application, terms such as “first”and “second” are used in the embodiments of this application todistinguish between same items or similar items that have basically samefunctions and purposes. A person skilled in the art may understand thatthe terms such as “first” and “second” do not constitute a limitation ona quantity or an execution sequence, and that the terms such as “first”and “second” do not indicate a definite difference. In addition, in theembodiments of this application, a word such as “example” or “forexample” is used to represent giving an example, an illustration, or adescription. Any embodiment or design described as an “example” or “forexample” in the embodiments of this application should not be explainedas being more preferred or having more advantages than anotherembodiment or design. Exactly, the word such as “example” or “forexample” is intended to present a related concept in a specific mannerfor ease of understanding.

The technical solutions provided in the embodiments of this applicationmay be used in various communications systems, such as a long termevolution (LTE) system or a new radio (NR) system (which may also bereferred to as a 5G system), or another new future-oriented system, forexample, a programmable user plane system. This is not specificallylimited in the embodiments of this application. In addition, the terms“system” and “network” are interchangeable.

FIG. 7 shows a communications system 70 according to an embodiment ofthis application. The communications system 70 includes a sessionmanagement function network element 701 and a user plane functionnetwork element 702. The session management function network element 701may directly communicate with the user plane function network element702, or may communicate with the user plane function network element 702through forwarding by another device. This is not specifically limitedin this embodiment of this application.

The session management function network element 701 is configured toobtain a first PDR. The first PDR is used to detect a multicast packet,and the first PDR indicates to carry on matching another PDR. Thesession management function network element 701 is further configured tosend an N4 session identifier and the first PDR to the user planefunction network element 702. The user plane function network element702 is configured to: receive the N4 session identifier and the firstPDR from the session management function network element 701, andconfigure the first PDR in an N4 session, corresponding to the N4session identifier, on the user plane function network element 702. Theuser plane function network element 702 is further configured to:receive the multicast packet, and match the multicast packet with a PDRon the user plane function network element 702, where the multicastpacket includes a multicast address. The user plane function networkelement 702 is further configured to: if the multicast packetsuccessfully matches the first PDR, carry on matching the multicastpacket with another PDR. Specific implementation of the solution isdescribed in detail in subsequent method embodiments. Details are notdescribed herein.

Based on the communications system, in this embodiment of thisapplication, routing rules configured by the session management functionnetwork element for the N4 session on the user plane function networkelement include the first PDR that is used to detect the multicastpacket. After the multicast packet successfully matches the first PDR,the user plane function network element carries on matching themulticast packet with another PDR on the user plane function networkelement. In other words, the multicast packet received by the user planefunction network element may match a plurality of PDRs, so that themulticast packet can be forwarded to a plurality of terminal devicesaccording to rules (for example, FARs) associated with the plurality ofPDRs. In this solution, when a terminal device member changes, thesession management function network element does not need to performexcessive operations. Therefore, compared with a solution in whichindication information in a FAR needs to be correspondingly updated whena terminal device member changes, this solution can improve efficiencyof forwarding a multicast packet, reduce a signaling interactionprocedure that is related to FAR updating and that is between thesession management function network element and the user plane functionnetwork element, and reduce signaling overheads.

Optionally, the communications system 70 shown in FIG. 7 may be used ina current 5G network, another future network, or the like. This is notspecifically limited in this embodiment of this application.

For example, it is assumed that the communications system 70 shown inFIG. 7 is used in the current 5G network. As shown in FIG. 8, a networkelement or an entity corresponding to the foregoing session managementfunction network element may be an SMF network element in the 5Gnetwork, and a network element or an entity corresponding to theforegoing user plane function network element may be a UPF networkelement in the 5G network.

In addition, as shown in FIG. 8, the 5G network may further include anaccess device, a PCF network element, an NEF network element, an accessand mobility management function (AMF) network element, and the like.This is not specifically limited in this embodiment of this application.

As shown in FIG. 8, a terminal device communicates with the AMF networkelement through a next generation (NG) 1 interface (N1 for short); theaccess device communicates with the AMF network element through an NG 2interface (N2 for short); the access device communicates with the UPFnetwork element through an NG 3 interface (N3 for short); the UPFnetwork element communicates with a DN through an NG 6 interface (N6 forshort); the AMF network element communicates with the SMF networkelement through an NG 11 interface (N11 for short); and the SMF networkelement communicates with the NEF network element through an NG 29interface (N29 for short).

Optionally, the terminal device in this embodiment of this applicationmay be a device configured to implement a wireless communicationfunction, for example, may be a terminal or a chip that can be used in aterminal. The terminal may be user equipment (UE), an access terminal, aterminal unit, a terminal station, a mobile station, a mobile console, aremote station, a remote terminal, a mobile device, a wirelesscommunications device, a terminal agent, a terminal apparatus, or thelike in an LTE system, an NR system, or a future evolved PLMN. Theaccess terminal may be a cellular phone, a cordless phone, a sessioninitiation protocol (SIP) phone, a wireless local loop (WLL) station, apersonal digital assistant (PDA), a handheld device or a computingdevice having a wireless communication function, another processingdevice connected to a wireless modem, a vehicle-mounted device, awearable device, a virtual reality (VR) terminal device, an augmentedreality (AR) terminal device, a wireless terminal in industrial control,a wireless terminal in self driving, a wireless terminal in telemedicine(remote medical), a wireless terminal in a smart grid, a wirelessterminal in transportation safety, a wireless terminal in a smart city,a wireless terminal in a smart home, or the like. The terminal may bemobile or in a fixed position.

Optionally, the access device in this embodiment of this application isa device that accesses a core network. For example, the access devicemay be a base station, a broadband network gateway (BNG), an aggregationswitch, or a non-3GPP access device. The base station may include basestations in various forms, for example, a macro base station, a microbase station (also referred to as a small cell), a relay station, and anaccess point.

Optionally, in this embodiment of this application, a related functionof the user plane function network element or the session managementfunction network element may be implemented by one device, or may bejointly implemented by a plurality of devices, or may be implemented byone or more functional modules in one device. This is not specificallylimited in this embodiment of this application. It can be understoodthat the foregoing function may be a function of a network element on ahardware device, or may be a software function run on dedicatedhardware, or may be a function of a combination of hardware andsoftware, or may be a virtualization function instantiated on a platform(for example, a cloud platform).

For example, a related function of the user plane function networkelement or the session management function network element in thisembodiment of this application may be implemented by a communicationsdevice 900 in FIG. 9. FIG. 9 is a schematic structural diagram of thecommunications device 900 according to an embodiment of thisapplication. The communications device 900 includes one or moreprocessors 901, a communication line 902, and at least onecommunications interface (in FIG. 9, that the communications device 900includes a communications interface 904 and one processor 901 is merelyan example for description). Optionally, the communications device 900may further include a memory 903.

The processor 901 may be a general-purpose central processing unit(CPU), a microprocessor, an application-specific integrated circuit(ASIC), or one or more integrated circuits for controlling programexecution of the solutions of this application.

The communication line 902 may include a path used to connect differentcomponents.

The communications interface 904 may be a transceiver module configuredto communicate with another device or a communications network such asthe Ethernet, a RAN, or a wireless local area network (WLAN). Forexample, the transceiver module may be an apparatus such as atransceiver or a transceiver component. Optionally, the communicationsinterface 904 may alternatively be a transceiver circuit located insidethe processor 901, and is configured to implement signal input andsignal output of the processor.

The memory 903 may be an apparatus having a storage function. Forexample, the memory 903 may be a read-only memory (ROM) or another typeof static storage device that can store static information and aninstruction, or a random access memory (RAM) or another type of dynamicstorage device that can store information and an instruction. The memory903 may alternatively be an electrically erasable programmable read-onlymemory (EEPROM), a compact disc read-only memory (CD-ROM) or anothercompact disc storage, optical disc storage (including a compact disc, alaser disc, an optical disc, a digital versatile disc, a Blu-ray disc,or the like), a magnetic disk storage medium or another magnetic storagedevice, or any other medium that can be used to carry or store expectedprogram code in a form of an instruction or a data structure and that isaccessible by a computer. However, the memory 903 is not limitedthereto. The memory may exist independently, and is connected to theprocessor through the communication line 902. Alternatively, the memorymay be integrated with the processor.

The memory 903 is configured to store a computer-executable instructionfor executing the solutions in this application, and the processor 901controls the execution of the computer-executable instruction. Theprocessor 901 is configured to execute the computer-executableinstruction stored in the memory 903, to implement a multicastcommunication method provided in the embodiments of this application.

Alternatively, optionally, in this embodiment of this application, theprocessor 901 may perform processing-related functions in the multicastcommunication method provided in the following embodiments of thisapplication, and the communications interface 904 is responsible forcommunication with another device or a communications network. This isnot specifically limited in this embodiment of this application.

Optionally, the computer-executable instruction in this embodiment ofthis application may also be referred to as application program code.This is not specifically limited in this embodiment of this application.

During specific implementation, in an embodiment, the processor 901 mayinclude one or more CPUs, for example, a CPU 0 and a CPU 1 in FIG. 9.

During specific implementation, in an embodiment, the communicationsdevice 900 may include a plurality of processors, for example, theprocessor 901 and a processor 908 in FIG. 9. Each of the processors maybe a single-core (single-CPU) processor or a multi-core (multi-CPU)processor. The processor herein may refer to one or more devices,circuits, and/or processing cores configured to process data (forexample, a computer program instruction).

During specific implementation, in an embodiment, the communicationsdevice 900 may further include an output device 905 and an input device906. The output device 905 communicates with the processor 901, and maydisplay information in a plurality of manners. For example, the outputdevice 905 may be a liquid crystal display (LCD), a light emitting diode(LED) display device, a cathode ray tube (CRT) display device, aprojector (projector), or the like. The input device 906 communicateswith the processor 901, and may receive an input of a user in aplurality of manners. For example, the input device 906 may be a mouse,a keyboard, a touchscreen device, a sensing device, or the like.

The communications device 900 may also be referred to as acommunications apparatus sometimes, and may be a general-purpose deviceor a special-purpose device. For example, the communications device 900may be a desktop computer, a portable computer, a network server, apalmtop computer (personal digital assistant, PDA), a mobile phone, atablet computer, a wireless terminal device, an embedded device, theforegoing terminal device, the foregoing network device, or a devicehaving a structure similar to the structure shown in FIG. 9. A type ofthe communications device 900 is not limited in this embodiment of thisapplication.

The following describes in detail the multicast communication methodprovided in the embodiments of this application with reference to FIG. 1to FIG. 9.

It should be noted that in the following embodiments of thisapplication, names of messages between network elements, names ofparameters in messages, or the like are merely examples, and there maybe other names during specific implementation. This is not specificallylimited in the embodiments of this application.

For example, the communications system shown in FIG. 7 is used in the 5Gnetwork shown in FIG. 8. FIG. 10 shows a multicast communication methodaccording to an embodiment of this application. The method includes thefollowing steps.

S1001: A UPF network element receives a multicast packet, where themulticast packet includes a multicast address.

S1002: The UPF network element matches the multicast packet with a PDRon the UPF network element.

S1003: If the multicast packet successfully matches a first PDR, and thefirst PDR indicates to carry on matching another PDR, the UPF networkelement carries on matching the multicast packet with another PDR.

Optionally, in this embodiment of this application, a priority of theanother PDR is not higher than that of the first PDR. A generaldescription is provided herein, and details are not described belowagain.

For a process of configuring the first PDR and the another PDR on theUPF network element, refer to the embodiment shown in FIG. 5 or FIG. 6.Details are not described herein again.

It should be noted that both the first PDR and the another PDR in thisembodiment of this application may be UL PDRs or DL PDRs. Alternatively,the first PDR in this embodiment of this application is a UL PDR, andthe another PDR includes a UL PDR and/or a DL PDR. Alternatively, thefirst PDR in this embodiment of this application is a DL PDR, and theanother PDR includes a UL PDR and/or a DL PDR. This is not specificallylimited in this embodiment of this application.

Optionally, in this embodiment of this application, the multicast packetincludes a broadcast packet, and correspondingly, the multicast addressincludes a broadcast address. Alternatively, the multicast packetincludes a groupcast packet, and correspondingly, the multicast addressincludes a groupcast address. For related descriptions of the broadcastaddress or the groupcast address, refer to the preamble part ofDESCRIPTION OF EMBODIMENTS, and details are not described herein again.

According to the multicast communication method, after the multicastpacket successfully matches the first PDR, if the first PDR indicates tocarry on matching another PDR, the UPF network element carries onmatching the multicast packet with another PDR. In other words, themulticast packet received by the UPF network element may match aplurality of PDRs, so that the multicast packet can be forwarded to aplurality of terminal devices according to FARs, QERs, and URRsassociated with the plurality of PDRs. In this solution, when a terminaldevice member changes, the SMF network element does not need to performexcessive operations. Therefore, compared with a solution in whichindication information in a FAR needs to be correspondingly updated whena terminal device member changes, this solution can improve efficiencyof forwarding a multicast packet, reduce a signaling interactionprocedure that is related to FAR updating and that is between the SMFnetwork element and the UPF network element, and reduce signalingoverheads.

Actions of the UPF network element in the foregoing steps S1001 to S1003may be performed by the processor 901 in the communications device 900shown in FIG. 9 by invoking the application program code stored in thememory 903. This is not limited in this embodiment of this application.

The following describes the multicast communication method shown in FIG.10 in detail with reference to a specific implementation.

In a possible implementation, when matching the multicast packet withthe PDR on the UPF network element, the UPF network element firstmatches the multicast packet with an N4 session to which the PDRbelongs. Further, the UPF network element matches the multicast packetwith each of PDRs in the N4 session in descending order of priorities ofthe PDRs. Specifically, as shown in FIG. 11, a multicast communicationmethod provided in an embodiment of this application includes thefollowing steps.

S101: A UPF network element receives a multicast packet, where themulticast packet includes a multicast address.

Optionally, in this embodiment of this application, if the UPF networkelement receives the multicast packet from a terminal device, themulticast packet may further include sender information of the multicastpacket. The sender information of the multicast packet includes addressinformation of the terminal device that sends the multicast packet.

For example, the address information of the terminal device that sendsthe multicast packet may be, for example, an IP address or a MAC addressof the terminal device. This is not specifically limited in thisembodiment of this application.

Alternatively, optionally, in this embodiment of this application, ifthe UPF network element receives the multicast packet from an N19 tunnelor a DN, the UPF network element may further receive sender informationof the multicast packet when receiving the multicast packet. The senderinformation of the multicast packet includes N19 indication informationor N6 indication information. The N6 indication information or the N19indication information is included in GTP-U tunnel header informationfor encapsulating the multicast packet.

For example, the N19 indication information in this embodiment of thisapplication may be, for example, a GTP-U TEID of the N19 tunnelconnecting the current UPF network element to another UPF networkelement.

For example, the N6 indication information in this embodiment of thisapplication may be, for example, information about an N6 interface.

S1102: After determining an N4 session to which the multicast packetbelongs, and finding a matched PDR in the N4 session, the UPF networkelement forwards the multicast packet to an internal interface of theUPF network element according to a rule associated with the PDR, toperform re-matching.

As described above, in this embodiment of this application, the ruleassociated with the PDR may include, for example, a FAR. Optionally, therule associated with the PDR may further include a URR and a QER. Ageneral description is provided herein, and details are not describedbelow again.

Optionally, in this embodiment of this application, that the UPF networkelement determines the N4 session to which the multicast packet belongsmay include the following:

The UPF network element determines network instance information andinterface information that are corresponding to the multicast packet. Ifthe interface information is the N19 interface information or the N6interface information, the UPF network element determines, withreference to an association relationship 1 and based on the networkinstance information and the interface information that arecorresponding to the multicast packet, the N4 session to which themulticast packet belongs on the UPF network element. The associationrelationship 1 includes an association relationship among the networkinstance information, the interface information and an identifier of theN4 session. Alternatively, if the interface information is N3 interfaceinformation (In other words, the UPF network element receives themulticast packet from the terminal device), the UPF network elementdetermines, with reference to an association relationship 2 and based onthe address information of the terminal device that sends the multicastpacket, and the network instance information and the interfaceinformation that are corresponding to the multicast packet, the N4session to which the multicast packet belongs on the UPF networkelement. The association relationship 2 includes an associationrelationship among the network instance information, the interfaceinformation, the address information of the terminal device that sendsthe multicast packet and an identifier of the N4 session.

Alternatively, optionally, in this embodiment of this application, thatthe UPF network element determines the N4 session to which the multicastpacket belongs may include the following:

The UPF network element determines network instance information andinterface information that are corresponding to the multicast packet. Ifthe interface information is N19 interface information or N6 interfaceinformation, the UPF network element determines, with reference to afirst target PDR and based on the network instance information and theinterface information that are corresponding to the multicast packet,the N4 session to which the multicast packet belongs on the UPF networkelement. The first target PDR includes an association relationship amongthe network instance information, the interface information and anidentifier of the N4 session. Alternatively, if the interfaceinformation is N3 interface information (In other words, the UPF networkelement receives the multicast packet from the terminal device), the UPFnetwork element determines, with reference to a second target PDR andbased on the address information of the terminal device that sends themulticast packet, and the network instance information and the interfaceinformation that are corresponding to the multicast packet, the N4session to which the multicast packet belongs on the UPF networkelement. The second target PDR includes an association relationshipamong the network instance information, the interface information, theaddress information of the terminal device that sends the multicastpacket and an identifier of the N4 session.

It should be noted that the first target PDR and the second target PDRin this embodiment of this application are special PDRs configured onthe UPF network element, and are used to determine the N4 session towhich the multicast packet belongs. A general description is providedherein, and details are not described below again. In addition, thefirst target PDR and the second target PDR in this embodiment of thisapplication may be a same PDR, or may be different PDRs. This is notspecifically limited in this embodiment of this application.

S1103: The UPF network element determines whether a next N4 session towhich the multicast packet belongs can be found.

If the UPF network element determines that a next N4 session to whichthe multicast packet belongs can be found, the UPF network elementperforms the following step S1104. Alternatively, if the UPF networkelement determines that a next N4 session to which the multicast packetbelongs cannot be found, the procedure ends.

S1104: The UPF network element matches the multicast packet with each ofPDRs in the N4 session in descending order of priorities of the PDRs, todetermine whether a PDR that matches the multicast packet exists.

For a process of matching the multicast packet with the PDR, refer tothe process of matching a data packet with a PDR in the preamble part ofDESCRIPTION OF EMBODIMENTS, and details are not described herein again.

If the UPF network element determines that a PDR that matches themulticast packet exists, and the PDR includes packet duplicationinformation, the UPF network element performs the following step S1105.Alternatively, if the UPF network element determines that a PDR thatmatches the multicast packet does not exist, the UPF network elementgoes back to step S1103.

S1105: If the multicast packet successfully matches a PDR, the UPFnetwork element determines whether packet duplication informationcorresponding to the PDR matches the sender information of the multicastpacket.

If the UPF network element determines that the packet duplicationinformation corresponding to the PDR matches the sender information ofthe multicast packet, the UPF network element performs the followingstep S1106, and then goes back to the foregoing step S1103.Alternatively, if the UPF network element determines that the packetduplication information corresponding to the PDR does not match thesender information of the multicast packet, the UPF network elementperforms the following step S1107, and then goes back to the foregoingstep S1103.

Optionally, in this embodiment of this application, that the packetduplication information corresponding to the PDR matches the senderinformation of the multicast packet means that the packet duplicationinformation corresponding to the PDR is different from the senderinformation of the multicast packet. That the packet duplicationinformation corresponding to the PDR does not match the senderinformation of the multicast packet means that the packet duplicationinformation corresponding to the PDR is the same as the senderinformation of the multicast packet. A general description is providedherein, and details are not described below again.

S1106: The UPF network element duplicates the multicast packet, andprocesses a duplicated multicast packet according to the rule associatedwith the PDR.

S1107: The UPF network element skips a process of processing themulticast packet according to the rule associated with the PDR.

In this embodiment of this application, it is considered by default thatif a PDR that matches the multicast packet exists in the N4 session, thePDR indicates to carry on matching another PDR. Therefore, after theforegoing step S1106 or step S1107 is performed, the UPF network elementmay go back to the foregoing step S1103. For example, the PDR mayinclude a type indication, an indication to carry on matching, thepacket duplication information, or packet duplication skip information.The type indication, the indication to carry on matching, the packetduplication information, or the packet duplication skip information isused to indicate to carry on matching another PDR, and the typeindication may indicate, for example, broadcast or groupcast.

It should be noted that this embodiment of this application is describedby using an example in which the multicast packet is matched withanother PDR on the UPF network element, and the duplicated multicastpacket is processed according to the rule associated with the PDR.Certainly, alternatively, the UPF network element may match theduplicated multicast packet with another PDR on the UPF network element,and process, according to the rule associated with the current PDR, themulticast packet that matches the current PDR. This is not specificallylimited in this embodiment of this application.

According to the multicast communication method provided in thisembodiment of this application, after the multicast packet successfullymatches to a PDR, if the PDR indicates to carry on matching another PDR,the UPF network element carries on matching the multicast packet withanother PDR on the UPF network element. In other words, the multicastpacket received by the UPF network element may match a plurality ofPDRs, so that the multicast packet can be forwarded to a plurality ofterminal devices according to rules associated with the plurality ofPDRs. In this solution, when a terminal device member changes, an SMFnetwork element does not need to perform excessive operations.Therefore, compared with a solution in which indication information in aFAR needs to be correspondingly updated when a terminal device memberchanges, this solution can improve efficiency of forwarding a multicastpacket, reduce a signaling interaction procedure that is related to FARupdating and that is between the SMF network element and the UPF networkelement, and reduce signaling overheads.

Actions of the UPF network element in the foregoing steps S1101 to S1107may be performed by the processor 901 in the communications device 900shown in FIG. 9 by invoking the application program code stored in thememory 903. This is not limited in this embodiment of this application.

Alternatively, in another possible implementation, when matching themulticast packet with the PDR on the UPF network element, the UPFnetwork element first matches the multicast packet with an N4 session towhich the PDR belongs. Further, the UPF network element matches themulticast packet with each of PDRs in the N4 session in descending orderof priorities of the PDRs. Specifically, as shown in FIG. 12, amulticast communication method provided in an embodiment of thisapplication includes the following steps.

Steps S1201 to S1203 are the same as steps S1101 to S1103 in theembodiment shown in FIG. 11. For related descriptions, refer to theembodiment shown in FIG. 11. Details are not described herein again.

S1204: The UPF network element matches the multicast packet with each ofPDRs in the N4 session in descending order of priorities of the PDRs, todetermine whether a PDR that matches the multicast packet exists.

For a process of matching the multicast packet with the PDR, refer tothe process of matching a data packet with a PDR in the preamble part ofDESCRIPTION OF EMBODIMENTS, and details are not described herein again.

If the UPF network element determines that a PDR that matches themulticast packet exists, and the PDR includes packet duplication skipinformation, the UPF network element performs the following step S1205.Alternatively, if the UPF network element determines that a PDR thatmatches the multicast packet does not exist, the UPF network elementgoes back to step S1203.

S1205: If the multicast packet successfully matches a PDR, the UPFnetwork element determines whether packet duplication skip informationcorresponding to the PDR matches the sender information of the multicastpacket.

If the UPF network element determines that the packet duplication skipinformation corresponding to the PDR does not match the senderinformation of the multicast packet, the UPF network element performsthe following step S1206, and then goes back to the foregoing stepS1203. Alternatively, if the UPF network element determines that thepacket duplication skip information corresponding to the PDR matches thesender information of the multicast packet, the UPF network elementperforms the following step S1207, and then goes back to the foregoingstep S1203.

Optionally, in this embodiment of this application, that the packetduplication skip information corresponding to the PDR matches the senderinformation of the multicast packet means that the packet duplicationskip information corresponding to the PDR is the same as the senderinformation of the multicast packet. That the packet duplication skipinformation corresponding to the PDR does not match the senderinformation of the multicast packet means that the packet duplicationskip information corresponding to the PDR is different from the senderinformation of the multicast packet. A general description is providedherein, and details are not described below again.

S1206: The UPF network element duplicates the multicast packet, andprocesses a duplicated multicast packet according to the rule associatedwith the PDR.

S1207: The UPF network element skips a process of processing theduplicated multicast packet according to the rule associated with thePDR.

In this embodiment of this application, it is considered by default thatif a PDR that matches the multicast packet exists in the N4 session, thePDR indicates to carry on matching another PDR. Therefore, after theforegoing step S1206 or step S1207 is performed, the UPF network elementmay go back to the foregoing step S1203. For example, the PDR mayinclude a type indication, an indication to carry on matching, packetduplication information, or the packet duplication skip information. Thetype indication, the indication to carry on matching, the packetduplication information, or the packet duplication skip information isused to indicate to carry on matching another PDR, and the typeindication may indicate, for example, broadcast or groupcast.

It should be noted that this embodiment of this application is describedby using an example in which the multicast packet is matched withanother PDR on the UPF network element, and the duplicated multicastpacket is processed according to the rule associated with the PDR.Certainly, alternatively, the UPF network element may match theduplicated multicast packet with another PDR on the UPF network element,and process, according to the rule associated with the current PDR, themulticast packet that matches the current PDR. This is not specificallylimited in this embodiment of this application.

According to the multicast communication method provided in thisembodiment of this application, after the multicast packet successfullymatches to a PDR, if the PDR indicates to carry on matching another PDR,the UPF network element carries on matching the multicast packet withanother PDR on the UPF network element. In other words, the multicastpacket received by the UPF network element may match a plurality ofPDRs, so that the multicast packet can be forwarded to a plurality ofterminal devices according to rules associated with the plurality ofPDRs. In this solution, when a terminal device member changes, an SMFnetwork element does not need to perform excessive operations.Therefore, compared with a solution in which indication information in aFAR needs to be correspondingly updated when a terminal device memberchanges, this solution can improve efficiency of forwarding a multicastpacket, reduce a signaling interaction procedure that is related to FARupdating and that is between the SMF network element and the UPF networkelement, and reduce signaling overheads.

Actions of the UPF network element in the foregoing steps S1201 to S1207may be performed by the processor 901 in the communications device 900shown in FIG. 9 by invoking the application program code stored in thememory 903. This is not limited in this embodiment of this application.

Alternatively, in another possible implementation, when matching themulticast packet with the PDR on the UPF network element, the UPFnetwork element directly matches the multicast packet with each of PDRson the user plane function network element in descending order ofpriorities of the PDRs. Specifically, as shown in FIG. 13, a multicastcommunication method provided in an embodiment of this applicationincludes the following steps.

Steps S1301 and S1302 are the same as steps S1101 and S1102 in theembodiment shown in FIG. 11. For related descriptions, refer to theembodiment shown in FIG. 11. Details are not described herein again.

S1303: The UPF network element matches the multicast packet with each ofPDRs on the UPF network element in descending order of priorities of thePDRs, to determine whether a PDR that matches the multicast packetexists.

For a process of matching the multicast packet with the PDR, refer tothe process of matching a data packet with a PDR in the preamble part ofDESCRIPTION OF EMBODIMENTS, and details are not described herein again.

If the UPF network element determines that a PDR that matches themulticast packet exists, and the PDR includes packet duplicationinformation, the UPF network element performs the following step S1304.Alternatively, if the UPF network element determines that a PDR thatmatches the multicast packet does not exist, the procedure ends.

Steps S1304 to S1306 are the same as steps S1105 to S1107 in theembodiment shown in FIG. 11. For related descriptions, refer to theembodiment shown in FIG. 11. Details are not described herein again.

S1307: If the multicast packet successfully matches a PDR, the UPFnetwork element determines whether the PDR includes indicationinformation, where the indication information indicates to carry onmatching another PDR.

For example, the indication information may include, for example, a typeindication, an indication to carry on matching, the packet duplicationinformation, or packet duplication skip information, and the typeindication may indicate, for example, broadcast or groupcast.

If the UPF network element determines that the PDR includes theindication information, the UPF network element goes back to step S1303.Alternatively, if the UPF network element determines that the PDR doesnot include the indication information, the UPF network element performsthe following step S1308.

S1308: The UPF network element processes the current multicast packetaccording to a rule associated with the PDR.

Optionally, there is no necessary execution sequence between step S1304and step S1307 in this embodiment of this application. Step S1304 may beperformed before or after step S1307. Alternatively, step S1304 and stepS1307 may be simultaneously performed. This is not specifically limitedin this embodiment of this application.

Certainly, in this embodiment of this application, if the UPF networkelement can determine a type of the multicast packet based on amulticast address, the UPF network element may alternatively go back tostep S1303. This is not specifically limited in this embodiment of thisapplication.

It should be noted that this embodiment of this application is describedby using an example in which the multicast packet is matched withanother PDR on the UPF network element, and a duplicated multicastpacket is processed according to the rule associated with the PDR.Certainly, alternatively, the UPF network element may match theduplicated multicast packet with another PDR on the UPF network element,and process, according to a FAR, a QER, and a URR that are associatedwith the current PDR, the multicast packet that matches the current PDR.This is not specifically limited in this embodiment of this application.

According to the multicast communication method provided in thisembodiment of this application, after the multicast packet successfullymatches with a PDR, if the PDR indicates to carry on matching anotherPDR, the UPF network element carries on matching the multicast packetwith another PDR, on the UPF network element, whose priority is nothigher than that of the PDR. In other words, the multicast packetreceived by the UPF network element may match a plurality of PDRs, sothat the multicast packet can be forwarded to a plurality of terminaldevices according to rules associated with the plurality of PDRs. Inthis solution, when a terminal device member changes, an SMF networkelement does not need to perform excessive operations. Therefore,compared with a solution in which indication information in a FAR needsto be correspondingly updated when a terminal device member changes,this solution can improve efficiency of forwarding a multicast packet,reduce a signaling interaction procedure that is related to FAR updatingand that is between the SMF network element and the UPF network element,and reduce signaling overheads.

Actions of the UPF network element in the foregoing steps S1301 to S1308may be performed by the processor 901 in the communications device 900shown in FIG. 9 by invoking the application program code stored in thememory 903. This is not limited in this embodiment of this application.

Actions of the UPF network element in the foregoing steps S1301 to S1307may be performed by the processor 901 in the communications device 900shown in FIG. 9 by invoking the application program code stored in thememory 903. This is not limited in this embodiment of this application.

Alternatively, in another possible implementation, when matching themulticast packet with the PDR on the UPF network element, the UPFnetwork element directly matches the multicast packet with each of PDRson the user plane function network element in descending order ofpriorities of the PDRs. Specifically, as shown in FIG. 14, a multicastcommunication method provided in an embodiment of this applicationincludes the following steps.

Steps S1401 and S1402 are the same as steps S1101 and S1102 in theembodiment shown in FIG. 11. For related descriptions, refer to theembodiment shown in FIG. 11. Details are not described herein again.

S1403: The UPF network element matches the multicast packet with each ofPDRs on the UPF network element in descending order of priorities of thePDRs, to determine whether a PDR that matches the multicast packetexists.

For a process of matching the multicast packet with the PDR, refer tothe process of matching a data packet with a PDR in the preamble part ofDESCRIPTION OF EMBODIMENTS, and details are not described herein again.

If the UPF network element determines that a PDR that matches themulticast packet exists, and the PDR includes packet duplication skipinformation, the UPF network element performs the following step S1404.Alternatively, if the UPF network element determines that a PDR thatmatches the multicast packet does not exist, the procedure ends.

Steps S1404 to S1406 are the same as steps S1205 to S1207 in theembodiment shown in FIG. 12. For related descriptions, refer to theembodiment shown in FIG. 12. Details are not described herein again.

S1407: If the multicast packet successfully matches a PDR, the UPFnetwork element determines whether the PDR includes indicationinformation, where the indication information indicates to carry onmatching another PDR.

For example, the indication information may include, for example, a typeindication, an indication to carry on matching, packet duplicationinformation, or the packet duplication skip information, and the typeindication may indicate, for example, broadcast or groupcast.

If the UPF network element determines that the PDR includes theindication information, the UPF network element goes back to step S1403.Alternatively, if the UPF network element determines that the PDR doesnot include the indication information, the UPF network element performsthe following step S1408.

S1408: The UPF network element processes the current multicast packetaccording to a rule associated with the PDR.

Optionally, there is no necessary execution sequence between step S1404and step S1407 in this embodiment of this application. Step S1404 may beperformed before or after step S1407. Alternatively, step S1404 and stepS1407 may be simultaneously performed. This is not specifically limitedin this embodiment of this application.

Certainly, in this embodiment of this application, if the UPF networkelement can determine a type of the multicast packet based on amulticast address, the UPF network element may alternatively go back tostep S1403. This is not specifically limited in this embodiment of thisapplication.

It should be noted that this embodiment of this application is describedby using an example in which the multicast packet is matched withanother PDR on the UPF network element, and a duplicated multicastpacket is processed according to the rule associated with the PDR.Certainly, alternatively, the UPF network element may match theduplicated multicast packet with another PDR on the UPF network element,and process, according to a FAR, a QER, and a URR that are associatedwith the current PDR, the multicast packet that matches the current PDR.This is not specifically limited in this embodiment of this application.

According to the multicast communication method provided in thisembodiment of this application, after the multicast packet successfullymatches to a PDR, if the PDR indicates to carry on matching another PDR,the UPF network element carries on matching the multicast packet withanother PDR on the UPF network element. In other words, the multicastpacket received by the UPF network element may match a plurality ofPDRs, so that the multicast packet can be forwarded to a plurality ofterminal devices according to rules associated with the plurality ofPDRs. In this solution, when a terminal device member changes, an SMFnetwork element does not need to perform excessive operations.Therefore, compared with a solution in which indication information in aFAR needs to be correspondingly updated when a terminal device memberchanges, this solution can improve efficiency of forwarding a multicastpacket, reduce a signaling interaction procedure that is related to FARupdating and that is between the SMF network element and the UPF networkelement, and reduce signaling overheads.

Actions of the UPF network element in the foregoing steps S1401 to S1407may be performed by the processor 901 in the communications device 900shown in FIG. 9 by invoking the application program code stored in thememory 903. This is not limited in this embodiment of this application.

The following describes the multicast communication methods shown inFIG. 11 to FIG. 14 by using several specific examples.

For example, it is assumed that an SMF network element creates, on a UPFnetwork element 1 for a group, n user-level N4 sessions and onegroup-level N4 session, which are shown in FIG. 15. In addition, routingrules shown in FIG. 15 are configured in the N4 session according to theprocedure of configuring a routing rule shown in FIG. 5 or FIG. 6. Eachgroup of routing rules includes a UL PDR, and a UL FAR, a UL QER (notshown), a UL URR (not shown) that are associated with the UL PDR; and aDL PDR, and a DL FAR, a DL QER (not shown), and a DL URR (not shown)that are associated with the DL PDR.

Step 1: After receiving a multicast packet from a terminal device 1, theUPF network element 1 determines an N4 session (namely, an N4 session 1in FIG. 15) to which the multicast packet belongs, and finds a matchedUL PDR in the N4 session. Then, the UPF network element 1 forwards themulticast packet to an internal interface of the UPF network element 1according to a UL FAR, a UL QER, and a UL URR that are associated withthe UL PDR, to perform re-matching.

Step 2: The UPF network element 1 determines whether a next N4 sessionto which the multicast packet belongs can be found. Herein, it isassumed that the next N4 session to which the multicast packet belongsis an N4 session 2, and after the UPF network element 1 matches themulticast packet with each of PDRs in the N4 session 2 in descendingorder of priorities of the PDRs, the UPF network element 1 determinesthat a DL PDR that matches the multicast packet exists. In addition,packet duplication information (which may be address information of aterminal device 2 herein) corresponding to the DL PDR matches senderinformation (which may be address information of the terminal device 1herein) of the multicast packet. Alternatively, packet duplication skipinformation (which may be address information of a terminal device 2herein) corresponding to the DL PDR does not match sender information(which may be address information of the terminal device 1 herein) ofthe multicast packet. In the foregoing cases, the UPF network element 1may duplicate the multicast packet, and process a duplicated multicastpacket according to a DL FAR, a DL QER, and a DL URR that are associatedwith the DL PDR. Then, the multicast packet may be transmitted to theterminal device 2.

Step 3: Assuming that the DL PDR that matches the multicast packet andthat is in the N4 session 2 indicates to carry on matching another PDR,the UPF network element 1 continues to determine whether a next N4session to which the multicast packet belongs can be found. Herein, itis assumed that the next N4 session to which the multicast packetbelongs is the N4 session 1, and after the UPF network element 1 matchesthe multicast packet with each of PDRs in the N4 session 1 in descendingorder of priorities of the PDRs, the UPF network element 1 determinesthat a DL PDR that matches the multicast packet exists. In addition,packet duplication information (which may be the address information ofthe terminal device 1 herein) corresponding to the DL PDR does not matchthe sender information (which may be the address information of theterminal device 1 herein) of the multicast packet. Alternatively, packetduplication skip information (which may be the address information ofthe terminal device 1 herein) corresponding to the DL PDR matches thesender information of the multicast packet (which may be the addressinformation of the terminal device 1 herein). In the foregoing cases,the UPF network element 1 skips a process of processing the multicastpacket.

Step 4: Assuming that the DL PDR that matches the multicast packet andthat is in the N4 session 1 indicates to carry on matching another PDR,the UPF network element 1 continues to determine whether a next N4session to which the multicast packet belongs can be found. Herein, itis assumed that the next N4 session to which the multicast packetbelongs is an N4 session 3, and after the UPF network element 1 matchesthe multicast packet with each of PDRs in the N4 session 3 in descendingorder of priorities of the PDRs, the UPF network element 1 determinesthat a DL PDR that matches the multicast packet exists. In addition,packet duplication information (which may be address information of aterminal device 3 herein) corresponding to the DL PDR matches the senderinformation (which may be the address information of the terminal device1 herein) of the multicast packet. Alternatively, packet duplicationskip information (which may be address information of a terminal device3 herein) corresponding to the DL PDR does not match the senderinformation (which may be the address information of the terminal device1 herein) of the multicast packet. In the foregoing cases, the UPFnetwork element 1 may duplicate the multicast packet, and process aduplicated multicast packet according to a FAR, a QER, and a URR thatare associated with the DL PDR. Then, the multicast packet may betransmitted to the terminal device 3.

Step 5: Assuming that the DL PDR that matches the multicast packet andthat is in the N4 session 3 indicates to carry on matching another PDR,the UPF network element 1 continues to determine whether a next N4session to which the multicast packet belongs can be found. Herein, itis assumed that the next N4 session to which the multicast packetbelongs is an N4 session n, and after the UPF network element 1 matchesthe multicast packet with each of PDRs in the N4 session n in descendingorder of priorities of the PDRs, the UPF network element 1 determinesthat a DL PDR that matches the multicast packet exists. In addition,packet duplication information (which may be address information of aterminal device n herein) corresponding to the DL PDR matches the senderinformation (which may be the address information of the terminal device1 herein) of the multicast packet. Alternatively, packet duplicationskip information (which may be address information of a terminal devicen herein) corresponding to the DL PDR does not match the senderinformation (which may be the address information of the terminal device1 herein) of the multicast packet. In the foregoing cases, the UPFnetwork element 1 may duplicate the multicast packet, and process aduplicated multicast packet according to a FAR, a QER, and a URR thatare associated with the DL PDR. Then, the multicast packet may betransmitted to the terminal device n.

Step 6: Assuming that the DL PDR that matches the multicast packet andthat is in the N4 session n indicates to carry on matching another PDR,the UPF network element 1 continues to determine whether a next N4session to which the multicast packet belongs can be found. Herein, itis assumed that the next N4 session to which the multicast packetbelongs is an N4 session ix, and after the UPF network element 1 matchesthe multicast packet with each of PDRs in the N4 session ix indescending order of priorities of the PDRs, the UPF network element 1determines that a UL PDR that matches the multicast packet exists. Inaddition, packet duplication information (which may be N19 indicationinformation herein) corresponding to the UL PDR matches the senderinformation (which may be the address information of the terminal device1 herein) of the multicast packet. Alternatively, packet duplicationskip information (which may be N19 indication information herein)corresponding to the UL PDR does not match the sender information (whichmay be the address information of the terminal device 1 herein) of themulticast packet. In the foregoing cases, the UPF network element 1 mayduplicate the multicast packet, and process a duplicated multicastpacket according to a FAR, a QER, and a URR that are associated with theUL PDR. Then, the multicast packet may be transmitted to a UPF networkelement 2, a UPF network element 3, and a DN.

The rest may be deduced by analogy, and the procedure ends until a nextN4 session to which the multicast packet belongs cannot be found.

Alternatively, for example, it is assumed that an SMF network elementcreates, on a UPF network element 1 for a group, n user-level N4sessions and one group-level N4 session, which are shown in FIG. 16. Inaddition, routing rules shown in FIG. 16 are configured in the N4session according to the procedure of configuring a routing rule shownin FIG. 5 or FIG. 6. Each group of routing rules includes a UL PDR, anda UL FAR, a UL QER (not shown), a UL URR (not shown) that are associatedwith the UL PDR; and a DL PDR, and a DL FAR, a DL QER (not shown), and aDL URR (not shown) that are associated with the DL PDR.

Step 1: After receiving a multicast packet from an N19 tunnel connectingthe UPF network element 1 to a UPF network element 2, the UPF networkelement 1 determines an N4 session (namely, an N4 session ix in FIG. 16)to which the multicast packet belongs, and finds a matched DL PDR in theN4 session. Then, the UPF network element 1 forwards the multicastpacket and N19 indication information to an internal interface of theUPF network element 1 according to a DL FAR, a DL QER, and a DL URR thatare associated with the DL PDR, to perform re-matching.

Step 2: The UPF network element 1 determines whether a next N4 sessionto which the multicast packet belongs can be found. Herein, it isassumed that the next N4 session to which the multicast packet belongsis an N4 session 2, and after the UPF network element 1 matches themulticast packet with each of PDRs in the N4 session 2 in descendingorder of priorities of the PDRs, the UPF network element 1 determinesthat a DL PDR that matches the multicast packet exists. In addition,packet duplication information (which may be address information of aterminal device 2 herein) corresponding to the DL PDR matches senderinformation (which may be the N19 indication information herein) of themulticast packet. Alternatively, packet duplication skip information(which may be address information of a terminal device 2 herein)corresponding to the DL PDR does not match sender information (which maybe the N19 indication information herein) of the multicast packet. Inthe foregoing cases, the UPF network element 1 may duplicate themulticast packet, and process a duplicated multicast packet according toa DL FAR, a DL QER, and a DL URR that are associated with the DL PDR.Then, the multicast packet may be transmitted to the terminal device 2.

Step 3: Assuming that the DL PDR that matches the multicast packet andthat is in the N4 session 2 indicates to carry on matching another PDR,the UPF network element 1 continues to determine whether a next N4session to which the multicast packet belongs can be found. Herein, itis assumed that the next N4 session to which the multicast packetbelongs is an N4 session 1, and after the UPF network element 1 matchesthe multicast packet with each of PDRs in the N4 session 1 in descendingorder of priorities of the PDRs, the UPF network element 1 determinesthat a DL PDR that matches the multicast packet exists. In addition,packet duplication information (which may be address information of aterminal device 1 herein) corresponding to the DL PDR matches the senderinformation (which may be the N19 indication information herein) of themulticast packet. Alternatively, packet duplication skip information(which may be address information of a terminal device 1 herein)corresponding to the DL PDR does not match the sender information (whichmay be the N19 indication information herein) of the multicast packet.In the foregoing cases, the UPF network element 1 may duplicate themulticast packet, and process a duplicated multicast packet according toa DL FAR, a DL QER, and a DL URR that are associated with the DL PDR.Then, the multicast packet may be transmitted to the terminal device 1.

Step 4: Assuming that the DL PDR that matches the multicast packet andthat is in the N4 session 1 indicates to carry on matching another PDR,the UPF network element 1 continues to determine whether a next N4session to which the multicast packet belongs can be found. Herein, itis assumed that the next N4 session to which the multicast packetbelongs is an N4 session 3, and after the UPF network element 1 matchesthe multicast packet with each of PDRs in the N4 session 3 in descendingorder of priorities of the PDRs, the UPF network element 1 determinesthat a DL PDR that matches the multicast packet exists. In addition,packet duplication information (which may be address information of aterminal device 3 herein) corresponding to the DL PDR matches the senderinformation (which may be the N19 indication information herein) of themulticast packet. Alternatively, packet duplication skip information(which may be address information of a terminal device 3 herein)corresponding to the DL PDR does not match the sender information (whichmay be the N19 indication information herein) of the multicast packet.In the foregoing cases, the UPF network element 1 may duplicate themulticast packet, and process a duplicated multicast packet according toa DL FAR, a DL QER, and a DL URR that are associated with the DL PDR.Then, the multicast packet may be transmitted to the terminal device 3.

Step 5: Assuming that the DL PDR that matches the multicast packet andthat is in the N4 session 3 indicates to carry on matching another PDR,the UPF network element 1 continues to determine whether a next N4session to which the multicast packet belongs can be found. Herein, itis assumed that the next N4 session to which the multicast packetbelongs is an N4 session n, and after the UPF network element 1 matchesthe multicast packet with each of PDRs in the N4 session n in descendingorder of priorities of the PDRs, the UPF network element 1 determinesthat a DL PDR that matches the multicast packet exists. In addition,packet duplication information (which may be address information of aterminal device n herein) corresponding to the DL PDR matches the senderinformation (which may be the N19 indication information herein) of themulticast packet. Alternatively, packet duplication skip information(which may be address information of a terminal device n herein)corresponding to the DL PDR does not match the sender information (whichmay be the N19 indication information herein) of the multicast packet.In the foregoing cases, the UPF network element 1 may duplicate themulticast packet, and process a duplicated multicast packet according toa DL FAR, a DL QER, and a DL URR that are associated with the DL PDR.Then, the multicast packet may be transmitted to the terminal device n.

Step 6: Assuming that the DL PDR that matches the multicast packet andthat is in the N4 session n indicates to carry on matching another PDR,the UPF network element 1 continues to determine whether a next N4session to which the multicast packet belongs can be found. Herein, itis assumed that the next N4 session to which the multicast packetbelongs is the N4 session ix, and after the UPF network element 1matches the multicast packet with each of PDRs in the N4 session ix indescending order of priorities of the PDRs, the UPF network element 1determines that a UL PDR that matches the multicast packet exists. Inaddition, packet duplication information (which may be the N19indication information herein) corresponding to the UL PDR does notmatch the sender information (which may be the N19 indicationinformation herein) of the multicast packet. Alternatively, packetduplication skip information (which may be the N19 indicationinformation herein) corresponding to the DL PDR matches the senderinformation of the multicast packet (which may be the N19 indicationinformation herein). In the foregoing cases, the UPF network element 1skips a process of processing the multicast packet.

The rest may be deduced by analogy, and the procedure ends until a nextN4 session to which the multicast packet belongs cannot be found.

It should be noted that the embodiment shown in FIG. 15 or FIG. 16 isdescribed by using an example in which the packet duplicationinformation corresponding to the UL PDR is the N19 indicationinformation. Certainly, in the embodiment shown in FIG. 15 or FIG. 16,the packet duplication information corresponding to the UL PDR mayalternatively include the N19 indication information and N6 indicationinformation. In this case, that the packet duplication informationcorresponding to the PDR matches the sender information of the multicastpacket may include: The packet duplication information corresponding tothe PDR does not include the sender information of the multicast packet.That the packet duplication information corresponding to the PDR doesnot match the sender information of the multicast packet includes: Thepacket duplication information corresponding to the PDR includes thesender information of the multicast packet. Alternatively, that thepacket duplication skip information corresponding to the PDR matches thesender information of the multicast packet may include: The packetduplication skip information corresponding to the PDR includes thesender information of the multicast packet. That the packet duplicationskip information corresponding to the PDR does not match the senderinformation of the multicast packet includes: The packet duplicationskip information corresponding to the PDR does not include the senderinformation of the multicast packet. A general description is providedherein, and details are not described below again.

It should be noted that, in the examples used for description in FIG. 15and FIG. 16, the multicast packet is first matched with the N4 session,and then matched with the PDR in the N4 session. Certainly,alternatively, after the multicast packet is forwarded to the internalinterface of the UPF network element 1 for re-matching, the UPF networkelement 1 may directly match the multicast packet with each of PDRs onthe UPF network element 1 in descending order of priorities of the PDRs.Details are not described herein again.

It should be noted that, in the examples used for description in FIG. 15and FIG. 16, the multicast packet is matched with another PDR on the UPFnetwork element 1, and the duplicated multicast packet is processedaccording to the FAR, the QER, and the URR that are associated with thecurrent PDR. Certainly, alternatively, the UPF network element 1 maymatch the duplicated multicast packet with another PDR on the UPFnetwork element 1, and process, according to the FAR, the QER, and theURR that are associated with the current PDR, the multicast packet thatmatches the current PDR. Details are not described herein again.

Optionally, an embodiment of this application may further provide amulticast communication method. In the multicast communication method,after receiving a multicast packet, a UPF network element determines anN4 session to which the multicast packet belongs, and finds a matchedPDR of a multicast type in the N4 session. A FAR associated with the PDRindicates the UPF network element to search for all target N4 sessions(excluding the current N4 session); duplicate a corresponding quantityof multicast packets based on information about the found target N4sessions; and then match the multicast packet with each of PDRs in eachof the found target N4 sessions. After the multicast packet successfullymatches a PDR, the multicast packet is processed according to a FAR, aQER, and a URR that are associated with the PDR. In this solution,because the FAR does not need to explicitly indicate tunnel informationor a label of a to-be-duplicated data packet, when a terminal devicemember changes, indication information in the FAR does not need to beupdated. This improves efficiency of forwarding a multicast packet,reduces a signaling interaction procedure between an SMF network elementand the UPF network element, and reduces signaling overheads.

It may be understood that, in the foregoing embodiments, the methodsand/or the steps that are implemented by the user plane function networkelement may alternatively be implemented by a component that can be usedon the user plane function network element. The methods and/or stepsimplemented by the session management function network element mayalternatively be implemented by a component that can be used on thesession management function network element.

The foregoing mainly describes the solutions provided in the embodimentsof this application from a perspective of interaction between thenetwork elements. Correspondingly, an embodiment of this applicationfurther provides a communications apparatus. The communicationsapparatus may be the user plane function network element in theforegoing method embodiment, or an apparatus including the user planefunction network element, or a component that can be used on the userplane function network element. Alternatively, the communicationsapparatus may be the session management function network element in theforegoing method embodiment, or an apparatus including the sessionmanagement function network element, or a component that can be used onthe session management function network element. It can be understoodthat, to implement the foregoing functions, the communications apparatusincludes a corresponding hardware structure and/or software module forperforming the functions. A person skilled in the art should be easilyaware that, in combination with the examples described in theembodiments disclosed in this specification, units and algorithm stepscan be implemented by hardware or a combination of hardware and computersoftware in this application. Whether a function is performed byhardware or hardware driven by computer software depends on particularapplications and design constraints of the technical solutions. A personskilled in the art may use different methods to implement the describedfunctions for each particular application, but it should not beconsidered that the implementation goes beyond the scope of thisapplication.

For example, the communications apparatus is the user plane functionnetwork element in the foregoing method embodiment. FIG. 17 is aschematic structural diagram of a user plane function network element170. The user plane function network element 170 includes a transceivermodule 1701 and a processing module 1702. The transceiver module 1701may also be referred to as a transceiver unit, and is configured toimplement a transceiver function. For example, the transceiver module1701 may be a transceiver circuit, a transceiver, a transceivercomponent, or a communications interface.

The transceiver module 1701 is configured to receive a multicast packet,where the multicast packet includes a multicast address. The processingmodule 1702 is configured to match the multicast packet with a PDR onthe user plane function network element. The processing module 1702 isconfigured to: if the multicast packet successfully matches a first PDR,and the first PDR indicates to carry on matching another PDR, carry onmatching the multicast packet with another PDR.

Optionally, the processing module 1702 is further configured to: ifpacket duplication information corresponding to the first PDR matchessender information of the multicast packet, duplicate the multicastpacket, and process a duplicated multicast packet according to a ruleassociated with the first PDR.

Alternatively, optionally, the processing module 1702 is furtherconfigured to: if packet duplication information corresponding to thefirst PDR does not match sender information of the multicast packet,skip a process of processing the multicast packet according to a ruleassociated with the first PDR.

Optionally, the processing module 1702 is further configured to: ifpacket duplication skip information corresponding to the first PDR doesnot match sender information of the multicast packet, duplicate themulticast packet, and process a duplicated multicast packet according toa rule associated with the first PDR.

Alternatively, optionally, the processing module 1702 is furtherconfigured to: if packet duplication skip information corresponding tothe first PDR matches sender information of the multicast packet, skip aprocess of processing the multicast packet according to a ruleassociated with the first PDR.

Optionally, the multicast packet includes the sender information of themulticast packet, and the sender information of the multicast packetincludes address information of a terminal device that sends themulticast packet.

Alternatively, optionally, the transceiver module 1701 is furtherconfigured to receive the sender information of the multicast packet,where the sender information of the multicast packet includes N19indication information or N6 indication information.

Optionally, that the processing module 1702 is configured to match themulticast packet with the PDR on the user plane function network elementincludes: The processing module 1702 is configured to: determine an N4session that matches the multicast packet and that is on the user planefunction network element; and match the multicast packet with each ofPDRs in the N4 session in descending order of priorities of the PDRs.

Alternatively, optionally, that the processing module 1702 is configuredto match the multicast packet with the PDR on the user plane functionnetwork element includes: The processing module 1702 is configured to:match the multicast packet with each of PDRs on the user plane functionnetwork element in descending order of priorities of the PDRs.

Optionally, the transceiver module 1701 is further configured to receivea first message from a session management function network element. Thefirst message includes an N4 session identifier, the first PDR, and aFAR, a QER, and a URR that are associated with the first PDR. The firstPDR is used to detect the multicast packet. The processing module 1702is further configured to configure, in the N4 session corresponding tothe N4 session identifier, the first PDR, and the FAR, the QER, and theURR that are associated with the first PDR.

Optionally, the transceiver module 1701 is further configured to receivean N4 session identifier and the first PDR from a session managementfunction network element. The first PDR is used to detect the multicastpacket. The processing module 1702 is further configured to configurethe first PDR in the N4 session corresponding to the N4 sessionidentifier.

All related content of the steps in the foregoing method embodiments maybe cited in function descriptions of corresponding functional modules.Details are not described herein again.

In this embodiment, the user plane function network element 170 ispresented in a form of functional modules obtained through division inan integrated manner. The “module” herein may be a specific ASIC, acircuit, a processor and a memory that execute one or more software orfirmware programs, an integrated logic circuit, and/or another part thatcan provide the foregoing functions. In a simple embodiment, a personskilled in the art may figure out that the user plane function networkelement 170 may be in a form of the communications device 900 shown inFIG. 9.

For example, the processor 901 in the communications device 900 shown inFIG. 9 may invoke the computer-executable instruction stored in thememory 903, to enable the network device 900 to perform the multicastcommunication method in the foregoing method embodiment.

Specifically, functions/implementation processes of the transceivermodule 1701 and the processing module 1702 in FIG. 17 may be implementedby the processor 901 in the communications device 900 shown in FIG. 9 byinvoking the computer-executable instruction stored in the memory 903.Alternatively, a function/an implementation process of the processingmodule 1702 in FIG. 17 may be implemented by the processor 901 in thecommunications device 900 shown in FIG. 9 by invoking thecomputer-executable instruction stored in the memory 903, and afunction/an implementation process of the transceiver module 1701 inFIG. 17 may be implemented by using the communications interface 904 inthe communications device 900 shown in FIG. 9.

The user plane function network element 170 provided in this embodimentof this application can perform the foregoing multicast communicationmethod. Therefore, for technical effects that can be achieved by theuser plane function network element 170, refer to the foregoing methodembodiment. Details are not described herein again.

Alternatively, for example, the communications apparatus is the sessionmanagement function network element in the foregoing method embodiment.FIG. 18 is a schematic structural diagram of a session managementfunction network element 180. The session management function networkelement 180 includes a transceiver module 1801 and a processing module1802. The transceiver module 1801 may also be referred to as atransceiver unit, and is configured to implement a transceiver function.For example, the transceiver module 1801 may be a transceiver circuit, atransceiver, a transceiver component, or a communications interface.

The processing module 1802 is configured to obtain a first PDR, wherethe first PDR is used to detect a multicast packet, and the first PDRindicates to carry on matching another PDR. The transceiver module 1801is configured to send an N4 session identifier and the first PDR to auser plane function network element, where the N4 session identifier andthe first PDR are used to configure the first PDR in an N4 session thatis corresponding to the N4 session identifier and that is on the userplane function network element.

Optionally, the multicast packet is a broadcast packet, andcorrespondingly, the first PDR includes a broadcast address. Theprocessing module 1802 is further configured to determine a first N4session that is corresponding to a group and that is on the user planefunction network element. The broadcast packet belongs to the group, andthe first N4 session is any one of all N4 sessions that arecorresponding to the group and that are on the user plane functionnetwork element. Correspondingly, the N4 session identifier is anidentifier of the first N4 session.

Alternatively, optionally, the multicast packet is a groupcast packet,and correspondingly, the first PDR includes a groupcast address. Theprocessing module 1802 is further configured to determine a second N4session that is corresponding to a group and that is on the user planefunction network element. The groupcast packet belongs to the group, andthe second N4 session is any one of N4 sessions on the user planefunction network element that are corresponding to the group and thatsupport forwarding of the groupcast packet. Correspondingly, the N4session identifier is an identifier of the second N4 session.

Optionally, that the processing module 1802 is configured to determinethe second N4 session that is corresponding to the group and that is onthe user plane function network element includes: The processing module1802 is configured to determine, based on an IGMP join message, a NASmessage, or an AF message, the second N4 session that is correspondingto the group and that is on the user plane function network element.

All related content of the steps in the foregoing method embodiments maybe cited in function descriptions of corresponding functional modules.Details are not described herein again.

In this embodiment, the session management function network element 180is presented in a form of functional modules obtained through divisionin an integrated manner. The “module” herein may be a specific ASIC, acircuit, a processor and a memory that execute one or more software orfirmware programs, an integrated logic circuit, and/or another part thatcan provide the foregoing functions. In a simple embodiment, a personskilled in the art may figure out that the session management functionnetwork element 180 may be in a form of the communications device 900shown in FIG. 9.

For example, the processor 901 in the communications device 900 shown inFIG. 9 may invoke the computer-executable instruction stored in thememory 903, to enable the network device 900 to perform the multicastcommunication method in the foregoing method embodiment.

Specifically, functions/implementation processes of the transceivermodule 1801 and the processing module 1802 in FIG. 18 may be implementedby the processor 901 in the communications device 900 shown in FIG. 9 byinvoking the computer-executable instruction stored in the memory 903.Alternatively, a function/an implementation process of the processingmodule 1802 in FIG. 18 may be implemented by the processor 901 in thecommunications device 900 shown in FIG. 9 by invoking thecomputer-executable instruction stored in the memory 903, and afunction/an implementation process of the transceiver module 1801 inFIG. 18 may be implemented by using the communications interface 904 inthe communications device 900 shown in FIG. 9.

The session management function network element 180 provided in thisembodiment of this application can perform the foregoing multicastcommunication method. Therefore, for technical effects that can beachieved by the session management function network element 180, referto the foregoing method embodiment. Details are not described hereinagain.

It should be noted that one or more of the foregoing modules or unitsmay be implemented by using software, hardware, or a combinationthereof. When any one of the foregoing modules or units is implementedby using software, the software exists in a form of a computer programinstruction, and is stored in a memory. A processor may be configured toexecute the program instruction to implement the foregoing methodprocedures. The processor may be integrated in an SoC (system on chip)or an ASIC, or may be an independent semiconductor chip. The processorincludes a core configured to perform an operation or processing byexecuting a software instruction, and may further include a necessaryhardware accelerator, for example, a field programmable gate array(FPGA), a PLD (programmable logic device), or a logic circuit thatimplements a dedicated logic operation.

When the foregoing modules or units are implemented by using hardware,the hardware may be any one of or any combination of a CPU, amicroprocessor, a digital signal processing (DSP) chip, amicrocontroller unit (MCU), an artificial intelligence processor, anASIC, an SoC, an FPGA, a PLD, a dedicated digital circuit, a hardwareaccelerator, or a non-integrated discrete component, and the hardwaremay run necessary software or does not depend on software, to performthe foregoing method procedures.

Optionally, an embodiment of this application further provides acommunications apparatus (for example, the communications apparatus maybe a chip or a chip system). The communications apparatus includes aprocessor, configured to implement the method in any one of theforegoing method embodiments. In a possible design, the communicationsapparatus further includes a memory. The memory is configured to store anecessary program instruction and necessary data. The processor mayinvoke program code stored in the memory, to indicate the communicationsapparatus to perform the method in any one of the foregoing methodembodiments. Certainly, the communications apparatus may not include thememory. When the communications apparatus is a chip system, thecommunications apparatus may include a chip, or may include a chip andanother discrete component. This is not specifically limited in thisembodiment of this application.

All or some of the foregoing embodiments may be implemented by usingsoftware, hardware, firmware, or any combination thereof. When asoftware program is used to implement the embodiments, the embodimentsmay be implemented completely or partially in a form of a computerprogram product. The computer program product includes one or morecomputer instructions. When the computer program instruction is loadedand executed on a computer, the procedure or functions according to theembodiments of this application are all or partially generated. Thecomputer may be a general-purpose computer, a special-purpose computer,a computer network, or another programmable apparatus. The computerinstruction may be stored in a computer readable storage medium, or maybe transmitted from one computer readable storage medium to anothercomputer readable storage medium. For example, the computer instructionmay be transmitted from a website, a computer, a server or a data centerto another website, computer, server, or data center in a wired (forexample, a coaxial cable, an optical fiber, or a digital subscriber line(DSL)) or wireless (for example, infrared, wireless, or microwave)manner. The computer-readable storage medium may be any usable mediumaccessible by a computer, or a data storage device, such as a server ora data center, integrating one or more usable media. The usable mediummay be a magnetic medium (for example, a floppy disk, a hard disk, or amagnetic tape), an optical medium (for example, a DVD), a semiconductormedium (for example, a solid-state drive (solid state disk, SSD)), orthe like.

Although this application is described with reference to theembodiments, in a process of implementing this application that claimsprotection, a person skilled in the art may understand and implementanother variation of the disclosed embodiments by viewing theaccompanying drawings, disclosed content, and the accompanying claims.In the claims, “comprise” (comprising) does not exclude anothercomponent or another step, and “a” or “one” does not exclude a meaningof plurality. A single processor or another unit may implement severalfunctions enumerated in the claims. Some measures are recorded independent claims that are different from each other, but this does notmean that these measures cannot be combined to produce a better effect.

Although this application is described with reference to specificfeatures and the embodiments thereof, it is clear that variousmodifications and combinations may be made to them without departingfrom the spirit and scope of this application. Correspondingly, thespecification and the accompanying drawings are merely exampledescription of this application defined by the appended claims, and isconsidered as any of or all modifications, variations, combinations orequivalents that cover the scope of this application. It is clear that aperson skilled in the art can make various modifications and variationsto this application without departing from the spirit and scope of thisapplication. This application is intended to cover the modifications andvariations of this application provided that they fall within the scopeof the claims of this application and their equivalent technologies.

1-21. (canceled)
 22. A communication method comprising: receiving, by auser plane function network element, a multicast packet, wherein themulticast packet comprises a multicast address; matching, by the userplane function network element, the multicast packet with one or morepacket detection rules (PDRs) on the user plane function networkelement; and when the multicast packet successfully matches a first PDRof the one or more PDRs, and the first PDR indicates to continuematching the multicast packet with another PDR, continuing, by the userplane function network element, matching the multicast packet with asecond PDR of the one or more PDRs.
 23. The method according to claim22, wherein the method further comprises: when packet duplication skipinformation corresponding to the first PDR does not match senderinformation of the multicast packet, duplicating, by the user planefunction network element, the multicast packet, and processing, by theuser plane function network element, a duplicated multicast packetaccording to a rule associated with the first PDR; or when the packetduplication skip information corresponding to the first PDR matches thesender information of the multicast packet, skipping, by the user planefunction network element, processing the multicast packet according to arule associated with the first PDR.
 24. The method according to claim23, wherein, that the packet duplication skip information correspondingto the first PDR matches the sender information of the multicast packetcomprises: the packet duplication skip information corresponding to thefirst PDR is same as the sender information of the multicast packet; andthat the packet duplication skip information corresponding to the firstPDR does not match the sender information of the multicast packetcomprises: the packet duplication skip information corresponding to thefirst PDR is different from the sender information of the multicastpacket.
 25. The method according to claim 23, wherein the multicastpacket comprises the sender information of the multicast packet, and thesender information of the multicast packet comprises address informationof a terminal device that sends the multicast packet.
 26. The methodaccording to claim 23, wherein the method further comprises: receiving,by the user plane function network element, the sender information ofthe multicast packet, wherein the sender information of the multicastpacket comprises N19 indication information or N6 indicationinformation.
 27. The method according to claim 26, wherein the N6indication information or the N19 indication information is comprised ingeneral packet radio service (GPRS) tunneling protocol-user plane(GTP-U) tunnel header information.
 28. The method according to claim 22,wherein the matching, by the user plane function network element, themulticast packet with the one or more PDRs on the user plane functionnetwork element comprises: determining, by the user plane functionnetwork element, an N4 session that matches the multicast packet andthat is on the user plane function network element; and matching, by theuser plane function network element, the multicast packet with each ofPDRs in the N4 session in descending order of priorities of the PDRs.29. The method according to claim 22, wherein the first PDR comprises atype indication, an indication to continue matching, packet duplicationinformation, or packet duplication skip information, and the typeindication, the indication to continue matching, the packet duplicationinformation, or the packet duplication skip information indicates tocontinue matching another PDR.
 30. The method according to claim 22,wherein the method further comprises: receiving, by the user planefunction network element, an N4 session identifier and the first PDRfrom a session management function network element, wherein the firstPDR is used to detect the multicast packet; and configuring, by the userplane function network element, the first PDR in a N4 sessioncorresponding to the N4 session identifier.
 31. The method according toclaim 22, wherein the multicast packet is a broadcast packet, and themulticast address is a broadcast address; or the multicast packetcomprises a groupcast packet, and the multicast address is a groupcastaddress.
 32. A communications apparatus, comprising: at least oneprocessor; and a non-transitory memory coupled to the at least oneprocessor and having program instructions stored thereon which, whenexecuted by the at least one processor, cause the apparatus to: obtain afirst packet detection rule (PDR), wherein the first PDR is used todetect a multicast packet; and send an N4 session identifier and thefirst PDR to a user plane function network element, the N4 sessionidentifier corresponding to an N4 session, wherein the N4 sessionidentifier and the first PDR enable the user plane function networkelement to configure the first PDR in the N4 session on the user planefunction network element, and the first PDR indicates the user planefunction network element to continue matching the multicast packet withanother PDR after detection of the multicast packet.
 33. Thecommunication apparatus according to claim 32, wherein the first PDRcomprises a type indication, an indication to continue matching, packetduplication information, or packet duplication skip information, and thetype indication, the indication to continue matching, the packetduplication information, or the packet duplication skip informationindicates to continue matching another PDR.
 34. The communicationapparatus according to claim 32, wherein the multicast packet is abroadcast packet, and the first PDR comprises a broadcast address; andthe program instructions further cause the apparatus to: determine afirst N4 session that corresponds to a group and that is on the userplane function network element, wherein the broadcast packet belongs tothe group, and the first N4 session is one of all N4 sessions thatcorrespond to the group and that are on the user plane function networkelement, and wherein the N4 session identifier is an identifier of thefirst N4 session.
 35. A communications apparatus, comprising: at leastone processor; and a non-transitory memory coupled to the at least oneprocessor and having program instructions stored thereon which, whenexecuted by the at least one processor, cause the apparatus to: receivea multicast packet, wherein the multicast packet comprises a multicastaddress; match the multicast packet with one or more packet detectionrules (PDRs) on the apparatus; and continuing matching the multicastpacket with a second PDR of the one or more PDRs when the multicastpacket successfully matches a first PDR of the one or more PDRs, and thefirst PDR indicates to continue matching the multicast packet withanother PDR.
 36. The communication apparatus according to claim 35,wherein the program instructions further cause the apparatus to: whenpacket duplication skip information corresponding to the first PDR doesnot match sender information of the multicast packet, duplicate themulticast packet, and process a duplicated multicast packet according toa rule associated with the first PDR; or when the packet duplicationskip information corresponding to the first PDR matches the senderinformation of the multicast packet, skip processing the multicastpacket according to a rule associated with the first PDR.
 37. Thecommunication apparatus according to claim 36, wherein the multicastpacket comprises the sender information of the multicast packet, and thesender information of the multicast packet comprises address informationof a terminal device that sends the multicast packet.
 38. Thecommunication apparatus according to claim 36, wherein the programinstructions further cause the apparatus to: receive the senderinformation of the multicast packet, wherein the sender information ofthe multicast packet comprises N19 indication information or N6indication information.
 39. The communication apparatus according toclaim 38, wherein the N6 indication information or the N19 indicationinformation is comprised in general packet radio service (GPRS)tunneling protocol-user plane (GTP-U) tunnel header information.
 40. Thecommunication apparatus according to claim 35, wherein the programinstructions further cause the apparatus to: determine an N4 sessionthat matches the multicast packet and that is on the apparatus; andmatch the multicast packet with each of PDRs in the N4 session indescending order of priorities of the PDRs.
 41. The communicationapparatus according to claim 35, wherein the first PDR comprises a typeindication, an indication to continue matching, packet duplicationinformation, or packet duplication skip information, and the typeindication, the indication to continue matching, the packet duplicationinformation, or the packet duplication skip information indicates tocontinue matching another PDR.
 42. The communication apparatus accordingto claim 35, wherein the program instructions further cause theapparatus to: receive an N4 session identifier and the first PDR from asession management function network element, wherein the first PDR isused to detect the multicast packet; and configure the first PDR in a N4session corresponding to the N4 session identifier.